From: Josh Boyer <jwboyer@linux.vnet.ibm.com>
To: Timur Tabi <timur@freescale.com>
Cc: linuxppc-dev@ozlabs.org, Judd Gilbert <JuddG@tanisys.com>
Subject: Re: Setting Kernel Allocated Memory Uncached on the PPC460
Date: Tue, 5 May 2009 19:08:24 -0400 [thread overview]
Message-ID: <20090505230824.GD14017@zod.rchland.ibm.com> (raw)
In-Reply-To: <ed82fe3e0905051416u79e431bdy8544a437c79c1cd1@mail.gmail.com>
On Tue, May 05, 2009 at 04:16:45PM -0500, Timur Tabi wrote:
>On Mon, May 4, 2009 at 1:55 PM, Judd Gilbert <JuddG@tanisys.com> wrote:
>> I have a driver which maps some kernel allocated memory to user space which
>> works, and now I am trying to set that memory non-cacheable, on a power PC
>> using the Denx ELDK (linux-2.6.24) on a PPC460ex.
>
>Because of the way the kernel maps main memory, you cannot do this.
>It is a violation of the PowerPC architecture to map a particular
>memory address as both cached and uncached (using different TLB
>entries) at the same time. When the kernel boots, it uses large
>mappings to map all of memory as cached. There is no mechanism to
>punch holes in these mappings. Therefore, if the memory is already
>mapped cached by the kernel, you cannot remap it as uncached.
>
>The only way around this is to use high memory, which is not mapped by
>the kernel normally. You can "bring in" a high memory page and map it
>uncached. However, I don't think there is a way for you to manually
>specify certain memory to be high.
That isn't entirely true. You can always limit the memory mapped via the
kernel with mem= (or via a memreserve), and then have a driver ioremap the
now unused memory.
josh
prev parent reply other threads:[~2009-05-05 23:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <AcnM6e3UsebkDqu/R72I7X8j7/gKCQ==>
2009-05-04 18:55 ` Setting Kernel Allocated Memory Uncached on the PPC460 Judd Gilbert
2009-05-05 21:16 ` Timur Tabi
2009-05-05 23:08 ` Josh Boyer [this message]
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=20090505230824.GD14017@zod.rchland.ibm.com \
--to=jwboyer@linux.vnet.ibm.com \
--cc=JuddG@tanisys.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=timur@freescale.com \
/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