]> Git Repo - linux.git/commitdiff
ARM: 8564/1: fix cpu feature extracting helper
authorVladimir Murzin <[email protected]>
Tue, 19 Apr 2016 11:35:55 +0000 (12:35 +0100)
committerRussell King <[email protected]>
Tue, 19 Apr 2016 18:42:26 +0000 (19:42 +0100)
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]>
arch/arm/include/asm/cputype.h

index b23c6c81c9ad88df191354d926be53cf4810e8f8..1ee94c716a7f87f45c00436fb9b2fa640014c811 100644 (file)
@@ -276,7 +276,7 @@ static inline int __attribute_const__ cpuid_feature_extract_field(u32 features,
        int feature = (features >> field) & 15;
 
        /* feature registers are signed values */
-       if (feature > 8)
+       if (feature > 7)
                feature -= 16;
 
        return feature;
This page took 0.055691 seconds and 4 git commands to generate.