From: nick.spence@freescale.com
To: linuxppc-dev@ozlabs.org
Cc: Nick Spence <nick.spence@freescale.com>
Subject: [PATCH] [POWERPC] Reintroduce O_SYNC flag to make DRAM non-cached.
Date: Wed, 7 May 2008 22:26:32 -0700 [thread overview]
Message-ID: <1210224392246-git-send-email-nick.spence@freescale.com> (raw)
From: Nick Spence <nick.spence@freescale.com>
This patch re-introduces the O_SYNC flag to make DRAM non-cached, which is the default behavior
for non PowerPC architectures in /drivers/char/mem.c
Signed-off-by: Nick Spence <nick.spence@freescale.com>
---
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index 5ccb579..f994b0a 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) || (!page_is_ram(pfn)))
vma_prot = __pgprot(pgprot_val(vma_prot)
| _PAGE_GUARDED | _PAGE_NO_CACHE);
return vma_prot;
--
1.5.5
next reply other threads:[~2008-05-08 5:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-08 5:26 nick.spence [this message]
2008-05-08 5:50 ` [PATCH] [POWERPC] Reintroduce O_SYNC flag to make DRAM non-cached Paul Mackerras
2008-05-08 6:31 ` Spence Nick
2008-05-08 6:55 ` Benjamin Herrenschmidt
2008-05-08 7:17 ` Nick Spence
2008-05-08 7:21 ` Benjamin Herrenschmidt
2008-05-08 9:54 ` Segher Boessenkool
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=1210224392246-git-send-email-nick.spence@freescale.com \
--to=nick.spence@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).