aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorKamal Dasu <kdasu.kdev@gmail.com>2013-06-14 13:10:03 -0400
committerRalf Baechle <ralf@linux-mips.org>2013-08-26 09:26:48 -0400
commit5b167c123b3c3582f62cf1896465019bc40fe526 (patch)
tree2deef8956db6c917fad2a58e651b609d4b412588 /arch/mips
parentd8dfad3876e4386666b759da3c833d62fb8b2267 (diff)
MIPS: Fix get_user_page_fast() for mips with cache alias
get_user_pages_fast() is missing cache flushes for MIPS platforms with cache aliases. 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. [ralf@linux-mips.org: Explicity include <asm/cpu-features.h>.] Signed-off-by: Kamal Dasu <kdasu.kdev@gmail.com> Cc: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/5469/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/mm/gup.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/mips/mm/gup.c b/arch/mips/mm/gup.c
index d4ea5c9c4a93..06ce17c2a905 100644
--- a/arch/mips/mm/gup.c
+++ b/arch/mips/mm/gup.c
@@ -12,6 +12,7 @@
12#include <linux/swap.h> 12#include <linux/swap.h>
13#include <linux/hugetlb.h> 13#include <linux/hugetlb.h>
14 14
15#include <asm/cpu-features.h>
15#include <asm/pgtable.h> 16#include <asm/pgtable.h>
16 17
17static inline pte_t gup_get_pte(pte_t *ptep) 18static inline pte_t gup_get_pte(pte_t *ptep)
@@ -273,7 +274,7 @@ int get_user_pages_fast(unsigned long start, int nr_pages, int write,
273 len = (unsigned long) nr_pages << PAGE_SHIFT; 274 len = (unsigned long) nr_pages << PAGE_SHIFT;
274 275
275 end = start + len; 276 end = start + len;
276 if (end < start) 277 if (end < start || cpu_has_dc_aliases)
277 goto slow_irqon; 278 goto slow_irqon;
278 279
279 /* XXX: batch / limit 'nr' */ 280 /* XXX: batch / limit 'nr' */