Commit
b8c9592 "ARM: 8318/1: treat CPU feature register fields as signed
quantities" introduced helper to extract signed quantities of 4-bit
blocks. However, with a current code feature with value 0b1000 isn't
rejected as negative. So fix the "if" condition.
Reported-by: Jonathan Brawn <[email protected]>
Signed-off-by: Vladimir Murzin <[email protected]>
Acked-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Russell King <[email protected]>
int feature = (features >> field) & 15;
/* feature registers are signed values */
- if (feature > 8)
+ if (feature > 7)
feature -= 16;
return feature;