arm64: kernel: Add cpuid_feature_extract_field() for 4bit sign extension
authorJames Morse <james.morse@arm.com>
Tue, 21 Jul 2015 12:23:26 +0000 (13:23 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 27 Jul 2015 10:08:40 +0000 (11:08 +0100)
commit79b0e09a3c9bd74ee54582efdb351179d7c00351
treef3b5bf111e01a35c09d0444cdc53bfe7da49ce18
parentae2fb7ece973f0b285f41985f5de85c57df9bf5a
arm64: kernel: Add cpuid_feature_extract_field() for 4bit sign extension

Based on arch/arm/include/asm/cputype.h, this function does the
shifting and sign extension necessary when accessing cpu feature fields.

Signed-off-by: James Morse <james.morse@arm.com>
Suggested-by: Russell King <linux@arm.linux.org.uk>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/cpufeature.h