public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Felix Domke" <tmbinc@elitedvb.net>
To: <linux-kernel@vger.kernel.org>
Subject: Allocating 16MB aligned phsyical memory
Date: Wed, 11 Dec 2002 10:23:39 +0100	[thread overview]
Message-ID: <079901c2a0f6$fdcc0340$4b00000a@elite> (raw)

Hi,

i'm almost a newbie to kernel hacking, and i'm currently writing a driver
for some powerpc-based chipset by IBM (STBxxxx), using the
2.4.xx-linuxppc_devel kernel.

Some On-Chip-Devices require a very strict alignment of memory. For example,
one function (mpeg2 transport demuxer) require that all (32) queues (each of
them about 32kb) reside in one 16MB region, each of them not crossing 1MB
boundary.

At the moment, i'm reserving a 16MB space of ram for which i made an own
allocater. needless to say that this sucks. So now i'm searching for a way
to allocate physical-mapped, contiguous, aligned (at 2^24 bytes) memory. I
already tried to understand __get_free_pages, map_page and the
powerpc-specific "consistent_alloc", but i couldn't think of enforcing the
alignments. I don't want to allocate 16MB more memory just for the
alignment.

I know that allocating 16MB-aligned memory isn't nice. But the other choice
is to completely reserve 16MB of RAM, which isn't nice either, since i only
need ~2MB of them.

Can anybody give me a hint how to do this?

felix domke


             reply	other threads:[~2002-12-11  9:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-11  9:23 Felix Domke [this message]
     [not found] <mailman.1039599127.17111.linux-kernel2news@redhat.com>
2002-12-11 22:43 ` Allocating 16MB aligned phsyical memory Pete Zaitcev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='079901c2a0f6$fdcc0340$4b00000a@elite' \
    --to=tmbinc@elitedvb.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox