Skip to content

Commit

Permalink
MIPS: Loongson: Fix phys_mem_access_prot() check
Browse files Browse the repository at this point in the history
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 <apatard@mandriva.com>
To: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/1161/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Arnaud Patard authored and Ralf Baechle committed Apr 30, 2010
1 parent ff40ad7 commit 514b6d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/loongson/common/mem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) |
Expand Down

0 comments on commit 514b6d0

Please sign in to comment.