From: Vladimir Murzin Date: Tue, 19 Apr 2016 11:35:55 +0000 (+0100) Subject: ARM: 8564/1: fix cpu feature extracting helper X-Git-Tag: v4.9.8~1945^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ac36a881b72a1e9831f1c59abf935868c90685cf;p=platform%2Fkernel%2Flinux-rpi3.git ARM: 8564/1: fix cpu feature extracting helper 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 Signed-off-by: Vladimir Murzin Acked-by: Ard Biesheuvel Signed-off-by: Russell King --- diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h index b23c6c8..1ee94c7 100644 --- a/arch/arm/include/asm/cputype.h +++ b/arch/arm/include/asm/cputype.h @@ -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;