LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Timur Tabi <timur@freescale.com>
To: Judd Gilbert <JuddG@tanisys.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Setting Kernel Allocated Memory Uncached on the PPC460
Date: Tue, 5 May 2009 16:16:45 -0500	[thread overview]
Message-ID: <ed82fe3e0905051416u79e431bdy8544a437c79c1cd1@mail.gmail.com> (raw)
In-Reply-To: <16691A8B34B5D9458EA3A1C37A11555A01351C87@tanisys-ex2.Tanisys.Local>

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.

-- 
Timur Tabi
Linux kernel developer at Freescale

  reply	other threads:[~2009-05-05 21:16 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 [this message]
2009-05-05 23:08     ` Josh Boyer

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=ed82fe3e0905051416u79e431bdy8544a437c79c1cd1@mail.gmail.com \
    --to=timur@freescale.com \
    --cc=JuddG@tanisys.com \
    --cc=linuxppc-dev@ozlabs.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