From: "Kamal Dasu" <kdasu.kdev@gmail.com>
To: ralf@linux-mips.org, linux-mips@linux-mips.org
Cc: "Kamal Dasu" <kdasu.kdev@gmail.com>
Subject: [PATCH] MIPS: Fix get_user_page_fast() for mips with cache alias
Date: Fri, 14 Jun 2013 14:10:03 -0400 [thread overview]
Message-ID: <1371233403-30153-1-git-send-email-kdasu.kdev@gmail.com> (raw)
get_user_pages_fast() is missing cache flushes for MIPS platforms
with cache alias. Filesystem failures observed with DirectIO
operations due to missing flush_anon_page() that use page coloring
logic to work with cache aliases. This fix falls through to take
slow_irqon path that calls get_user_pages() that has required
logic for platforms where cpu_has_dc_aliases is true.
Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com>
---
arch/mips/mm/gup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c
index d4ea5c9..346fb7e 100644
--- a/arch/mips/mm/gup.c
+++ b/arch/mips/mm/gup.c
@@ -273,7 +273,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
len = (unsigned long) nr_pages << PAGE_SHIFT;
end = start + len;
- if (end < start)
+ if (end < start || cpu_has_dc_aliases)
goto slow_irqon;
/* XXX: batch / limit 'nr' */
--
1.8.2.3
next reply other threads:[~2013-06-14 18:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-14 18:10 Kamal Dasu [this message]
2013-06-18 16:47 ` [PATCH] MIPS: Fix get_user_page_fast() for mips with cache alias Ralf Baechle
2013-07-19 15:34 ` Kevin Cernekee
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=1371233403-30153-1-git-send-email-kdasu.kdev@gmail.com \
--to=kdasu.kdev@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.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