From 514b6d0c06a5d751259f145d9593b4d084c1cce3 Mon Sep 17 00:00:00 2001 From: Arnaud Patard Date: Thu, 29 Apr 2010 11:58:49 +0200 Subject: [PATCH] MIPS: Loongson: Fix phys_mem_access_prot() check The check used to determine if uncached accelerated should be used or not is wrong. The parenthesis are misplaced and making the test fail. Signed-off-by: Arnaud Patard To: linux-mips@linux-mips.org Patchwork: http://patchwork.linux-mips.org/patch/1161/ Signed-off-by: Ralf Baechle --- arch/mips/loongson/common/mem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/mips/loongson/common/mem.c b/arch/mips/loongson/common/mem.c index b5f4025..30eba60 100644 --- a/arch/mips/loongson/common/mem.c +++ b/arch/mips/loongson/common/mem.c @@ -75,7 +75,7 @@ pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, unsigned long end = offset + size; if (__uncached_access(file, offset)) { - if (((uca_start && offset) >= uca_start) && + if (uca_start && (offset >= uca_start) && (end <= uca_end)) return __pgprot((pgprot_val(vma_prot) & ~_CACHE_MASK) | -- 2.7.4