arm64: cpufeature: append additional id_aa64mmfr2 fields to cpufeature
authorKefeng Wang <wangkefeng.wang@huawei.com>
Fri, 25 Mar 2016 09:30:07 +0000 (17:30 +0800)
committerWill Deacon <will.deacon@arm.com>
Wed, 13 Apr 2016 13:49:23 +0000 (14:49 +0100)
There are some new cpu features which can be identified by id_aa64mmfr2,
this patch appends all fields of it.

Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/sysreg.h
arch/arm64/kernel/cpufeature.c

index 12874164b0ae5198cfc9d00d1721d8f58cb8ae51..19182ef18f8f05a537f64d00939954922ffd4ab3 100644 (file)
 #define ID_AA64MMFR1_VMIDBITS_16       2
 
 /* id_aa64mmfr2 */
+#define ID_AA64MMFR2_LVA_SHIFT         16
+#define ID_AA64MMFR2_IESB_SHIFT                12
+#define ID_AA64MMFR2_LSM_SHIFT         8
 #define ID_AA64MMFR2_UAO_SHIFT         4
+#define ID_AA64MMFR2_CNP_SHIFT         0
 
 /* id_aa64dfr0 */
 #define ID_AA64DFR0_CTX_CMPS_SHIFT     28
index 943f5140e0f33d592a78d179b8c8d68e5851e837..677f17cd05d1b1379f0d607b82e8caad3674fbfc 100644 (file)
@@ -130,7 +130,11 @@ static struct arm64_ftr_bits ftr_id_aa64mmfr1[] = {
 };
 
 static struct arm64_ftr_bits ftr_id_aa64mmfr2[] = {
+       ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, ID_AA64MMFR2_LVA_SHIFT, 4, 0),
+       ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, ID_AA64MMFR2_IESB_SHIFT, 4, 0),
+       ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, ID_AA64MMFR2_LSM_SHIFT, 4, 0),
        ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, ID_AA64MMFR2_UAO_SHIFT, 4, 0),
+       ARM64_FTR_BITS(FTR_STRICT, FTR_EXACT, ID_AA64MMFR2_CNP_SHIFT, 4, 0),
        ARM64_FTR_END,
 };