diff options
author | Catalin Marinas <catalin.marinas@com.rmk.(none)> | 2004-08-05 22:51:47 +0100 |
---|---|---|
committer | Russell King <rmk@flint.arm.linux.org.uk> | 2004-08-05 22:51:47 +0100 |
commit | fa6776840d366496839eb0fa017e49619f25befc (patch) | |
tree | be85d7b136b87014cc654ec8b577284bb212c9b1 /arch | |
parent | 30e74fea2a4c91f78fceed7d642535699baa1b67 (diff) | |
download | history-fa6776840d366496839eb0fa017e49619f25befc.tar.gz |
[ARM PATCH] 1964/1: Wrong cache block operations checking
Patch from Catalin Marinas
The "err" is rotated in the blockops_check() function and all the error bits are cleared, the subsequent conditions being always true.
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mm/blockops.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mm/blockops.c b/arch/arm/mm/blockops.c index 9982c4c8cffe78..806c6eeb1b0c94 100644 --- a/arch/arm/mm/blockops.c +++ b/arch/arm/mm/blockops.c @@ -130,6 +130,7 @@ static struct undef_hook blockops_hook __initdata = { static int __init blockops_check(void) { register unsigned int err asm("r4") = 0; + unsigned int err_pos = 1; unsigned int cache_type; int i; @@ -156,8 +157,8 @@ static int __init blockops_check(void) unregister_undef_hook(&blockops_hook); - for (i = 0; i < ARRAY_SIZE(func); i++, err >>= 1) - printk("%30s: %ssupported\n", func[i], err & 1 ? "not " : ""); + for (i = 0; i < ARRAY_SIZE(func); i++, err_pos <<= 1) + printk("%30s: %ssupported\n", func[i], err & err_pos ? "not " : ""); if ((err & 8) == 0) { printk(" --> Using %s block cache invalidate\n", |