From fa6776840d366496839eb0fa017e49619f25befc Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Thu, 5 Aug 2004 22:51:47 +0100 Subject: [PATCH] [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. --- arch/arm/mm/blockops.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/mm/blockops.c b/arch/arm/mm/blockops.c index 9982c4c8cffe7..806c6eeb1b0c9 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", -- 2.53.0