summaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm
diff options
context:
space:
mode:
authorVladimir Murzin <vladimir.murzin@arm.com>2016-04-19 13:35:55 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2016-04-19 20:42:26 +0200
commitac36a881b72a1e9831f1c59abf935868c90685cf (patch)
tree82589bea053c019bd8f5745fbfe8a677555a8beb /arch/arm/include/asm
parentARM: 8563/1: fix demoting HWCAP_SWP (diff)
downloadlinux-ac36a881b72a1e9831f1c59abf935868c90685cf.tar.xz
linux-ac36a881b72a1e9831f1c59abf935868c90685cf.zip
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 <Jon.Brawn@arm.com> Signed-off-by: Vladimir Murzin <vladimir.murzin@arm.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r--arch/arm/include/asm/cputype.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/include/asm/cputype.h b/arch/arm/include/asm/cputype.h
index b23c6c81c9ad..1ee94c716a7f 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;