Commit fa677684 authored by Catalin Marinas's avatar Catalin Marinas Committed by Russell King

[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.
parent 30e74fea
......@@ -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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment