[PATCH] MIPS: Fix get_user_page_fast() for mips with cache alias

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux