Re: [RFC] powerpc/mm: honor O_SYNC flag for memory map
From: Kumar Gala <hidden>
Date: 2009-11-19 13:55:32
On Nov 17, 2009, at 1:10 AM, Li Yang wrote:
Rather than the original intelligent way, we grant user more freedom. This enables user to map cacheable memory not managed by Linux. Signed-off-by: Li Yang <redacted> --- The only direct users of this function is fb_mmap() and /dev/mem mmap. Although I'm not sure if anything is depending on the intelligent setting of cacheability.
is there some reason to change this? - k
quoted hunk ↗ jump to hunk
arch/powerpc/mm/mem.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 579382c..0fd267e 100644 --- a/arch/powerpc/mm/mem.c +++ b/arch/powerpc/mm/mem.c@@ -101,7 +101,7 @@ pgprot_t phys_mem_access_prot(struct file *file,unsigned long pfn, if (ppc_md.phys_mem_access_prot) return ppc_md.phys_mem_access_prot(file, pfn, size, vma_prot); - if (!page_is_ram(pfn)) + if (file->f_flags & O_SYNC) vma_prot = pgprot_noncached(vma_prot); return vma_prot; -- 1.6.4 _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev