From: Paul Mackerras <paulus@samba.org>
To: Li Yang <leoli@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH] powerpc/mm: honor O_SYNC flag for memory mapping
Date: Fri, 27 Nov 2009 13:40:08 +1100 [thread overview]
Message-ID: <19215.15368.477999.332414@drongo.ozlabs.ibm.com> (raw)
In-Reply-To: <1259222529-27645-1-git-send-email-leoli@freescale.com>
Li Yang writes:
> There was no way to set mapped memory as cacheable if the memory
> is not managed by Linux kernel. It's not rare in real system to
> allocate some dedicated memory to a certain application which is not
> managed by kernel and then mmap'ed the memory to the application.
> The memory should be cacheable but we can't map it to be cacheable
> due to the intelligent setting of cacheability.
>
> The patch makes the cacheability depend on O_SYNC flag of the file
> mapped for non-kernel managed memory. Also prints a deprecation
> warning for mmap users without using O_SYNC.
NAK, since it is an incompatible change to the kernel ABI.
What sort of memory is this that you want to map as cacheable? Is it
normal system RAM that your platform code reserves, or is it some
other kind of memory?
If it's the normal system RAM, you could make phys_mem_access_prot()
smart enough to recognize that (by looking in the lmb array or the
device tree).
If it's another kind of memory, it should be described in the device
tree, and you could have a platform-specific phys_mem_access_prot
function for your platform that looks in the device tree to see if the
memory being mapped is this special sort of memory.
Paul.
prev parent reply other threads:[~2009-11-27 2:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-26 8:02 [PATCH] powerpc/mm: honor O_SYNC flag for memory mapping Li Yang
2009-11-27 2:40 ` Paul Mackerras [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=19215.15368.477999.332414@drongo.ozlabs.ibm.com \
--to=paulus@samba.org \
--cc=leoli@freescale.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;
as well as URLs for NNTP newsgroup(s).