@@ -553,7 +553,7 @@ cpuid_feature_cap_perfmon_field(u64 features, int field, u64 cap)
553
553
u64 mask = GENMASK_ULL (field + 3 , field );
554
554
555
555
/* Treat IMPLEMENTATION DEFINED functionality as unimplemented */
556
- if (val == ID_AA64DFR0_PMUVER_IMP_DEF )
556
+ if (val == ID_AA64DFR0_EL1_PMUVer_IMP_DEF )
557
557
val = 0 ;
558
558
559
559
if (val > cap ) {
@@ -597,43 +597,43 @@ static inline s64 arm64_ftr_value(const struct arm64_ftr_bits *ftrp, u64 val)
597
597
598
598
static inline bool id_aa64mmfr0_mixed_endian_el0 (u64 mmfr0 )
599
599
{
600
- return cpuid_feature_extract_unsigned_field (mmfr0 , ID_AA64MMFR0_BIGENDEL_SHIFT ) == 0x1 ||
601
- cpuid_feature_extract_unsigned_field (mmfr0 , ID_AA64MMFR0_BIGENDEL0_SHIFT ) == 0x1 ;
600
+ return cpuid_feature_extract_unsigned_field (mmfr0 , ID_AA64MMFR0_EL1_BIGEND_SHIFT ) == 0x1 ||
601
+ cpuid_feature_extract_unsigned_field (mmfr0 , ID_AA64MMFR0_EL1_BIGENDEL0_SHIFT ) == 0x1 ;
602
602
}
603
603
604
604
static inline bool id_aa64pfr0_32bit_el1 (u64 pfr0 )
605
605
{
606
- u32 val = cpuid_feature_extract_unsigned_field (pfr0 , ID_AA64PFR0_EL1_SHIFT );
606
+ u32 val = cpuid_feature_extract_unsigned_field (pfr0 , ID_AA64PFR0_EL1_EL1_SHIFT );
607
607
608
- return val == ID_AA64PFR0_ELx_32BIT_64BIT ;
608
+ return val == ID_AA64PFR0_EL1_ELx_32BIT_64BIT ;
609
609
}
610
610
611
611
static inline bool id_aa64pfr0_32bit_el0 (u64 pfr0 )
612
612
{
613
- u32 val = cpuid_feature_extract_unsigned_field (pfr0 , ID_AA64PFR0_EL0_SHIFT );
613
+ u32 val = cpuid_feature_extract_unsigned_field (pfr0 , ID_AA64PFR0_EL1_EL0_SHIFT );
614
614
615
- return val == ID_AA64PFR0_ELx_32BIT_64BIT ;
615
+ return val == ID_AA64PFR0_EL1_ELx_32BIT_64BIT ;
616
616
}
617
617
618
618
static inline bool id_aa64pfr0_sve (u64 pfr0 )
619
619
{
620
- u32 val = cpuid_feature_extract_unsigned_field (pfr0 , ID_AA64PFR0_SVE_SHIFT );
620
+ u32 val = cpuid_feature_extract_unsigned_field (pfr0 , ID_AA64PFR0_EL1_SVE_SHIFT );
621
621
622
622
return val > 0 ;
623
623
}
624
624
625
625
static inline bool id_aa64pfr1_sme (u64 pfr1 )
626
626
{
627
- u32 val = cpuid_feature_extract_unsigned_field (pfr1 , ID_AA64PFR1_SME_SHIFT );
627
+ u32 val = cpuid_feature_extract_unsigned_field (pfr1 , ID_AA64PFR1_EL1_SME_SHIFT );
628
628
629
629
return val > 0 ;
630
630
}
631
631
632
632
static inline bool id_aa64pfr1_mte (u64 pfr1 )
633
633
{
634
- u32 val = cpuid_feature_extract_unsigned_field (pfr1 , ID_AA64PFR1_MTE_SHIFT );
634
+ u32 val = cpuid_feature_extract_unsigned_field (pfr1 , ID_AA64PFR1_EL1_MTE_SHIFT );
635
635
636
- return val >= ID_AA64PFR1_MTE ;
636
+ return val >= ID_AA64PFR1_EL1_MTE_MTE2 ;
637
637
}
638
638
639
639
void __init setup_cpu_features (void );
@@ -659,7 +659,7 @@ static inline bool supports_csv2p3(int scope)
659
659
pfr0 = read_sanitised_ftr_reg (SYS_ID_AA64PFR0_EL1 );
660
660
661
661
csv2_val = cpuid_feature_extract_unsigned_field (pfr0 ,
662
- ID_AA64PFR0_CSV2_SHIFT );
662
+ ID_AA64PFR0_EL1_CSV2_SHIFT );
663
663
return csv2_val == 3 ;
664
664
}
665
665
@@ -694,10 +694,10 @@ static inline bool system_supports_4kb_granule(void)
694
694
695
695
mmfr0 = read_sanitised_ftr_reg (SYS_ID_AA64MMFR0_EL1 );
696
696
val = cpuid_feature_extract_unsigned_field (mmfr0 ,
697
- ID_AA64MMFR0_TGRAN4_SHIFT );
697
+ ID_AA64MMFR0_EL1_TGRAN4_SHIFT );
698
698
699
- return (val >= ID_AA64MMFR0_TGRAN4_SUPPORTED_MIN ) &&
700
- (val <= ID_AA64MMFR0_TGRAN4_SUPPORTED_MAX );
699
+ return (val >= ID_AA64MMFR0_EL1_TGRAN4_SUPPORTED_MIN ) &&
700
+ (val <= ID_AA64MMFR0_EL1_TGRAN4_SUPPORTED_MAX );
701
701
}
702
702
703
703
static inline bool system_supports_64kb_granule (void )
@@ -707,10 +707,10 @@ static inline bool system_supports_64kb_granule(void)
707
707
708
708
mmfr0 = read_sanitised_ftr_reg (SYS_ID_AA64MMFR0_EL1 );
709
709
val = cpuid_feature_extract_unsigned_field (mmfr0 ,
710
- ID_AA64MMFR0_TGRAN64_SHIFT );
710
+ ID_AA64MMFR0_EL1_TGRAN64_SHIFT );
711
711
712
- return (val >= ID_AA64MMFR0_TGRAN64_SUPPORTED_MIN ) &&
713
- (val <= ID_AA64MMFR0_TGRAN64_SUPPORTED_MAX );
712
+ return (val >= ID_AA64MMFR0_EL1_TGRAN64_SUPPORTED_MIN ) &&
713
+ (val <= ID_AA64MMFR0_EL1_TGRAN64_SUPPORTED_MAX );
714
714
}
715
715
716
716
static inline bool system_supports_16kb_granule (void )
@@ -720,10 +720,10 @@ static inline bool system_supports_16kb_granule(void)
720
720
721
721
mmfr0 = read_sanitised_ftr_reg (SYS_ID_AA64MMFR0_EL1 );
722
722
val = cpuid_feature_extract_unsigned_field (mmfr0 ,
723
- ID_AA64MMFR0_TGRAN16_SHIFT );
723
+ ID_AA64MMFR0_EL1_TGRAN16_SHIFT );
724
724
725
- return (val >= ID_AA64MMFR0_TGRAN16_SUPPORTED_MIN ) &&
726
- (val <= ID_AA64MMFR0_TGRAN16_SUPPORTED_MAX );
725
+ return (val >= ID_AA64MMFR0_EL1_TGRAN16_SUPPORTED_MIN ) &&
726
+ (val <= ID_AA64MMFR0_EL1_TGRAN16_SUPPORTED_MAX );
727
727
}
728
728
729
729
static inline bool system_supports_mixed_endian_el0 (void )
@@ -738,7 +738,7 @@ static inline bool system_supports_mixed_endian(void)
738
738
739
739
mmfr0 = read_sanitised_ftr_reg (SYS_ID_AA64MMFR0_EL1 );
740
740
val = cpuid_feature_extract_unsigned_field (mmfr0 ,
741
- ID_AA64MMFR0_BIGENDEL_SHIFT );
741
+ ID_AA64MMFR0_EL1_BIGEND_SHIFT );
742
742
743
743
return val == 0x1 ;
744
744
}
@@ -840,13 +840,13 @@ extern int do_emulate_mrs(struct pt_regs *regs, u32 sys_reg, u32 rt);
840
840
static inline u32 id_aa64mmfr0_parange_to_phys_shift (int parange )
841
841
{
842
842
switch (parange ) {
843
- case ID_AA64MMFR0_PARANGE_32 : return 32 ;
844
- case ID_AA64MMFR0_PARANGE_36 : return 36 ;
845
- case ID_AA64MMFR0_PARANGE_40 : return 40 ;
846
- case ID_AA64MMFR0_PARANGE_42 : return 42 ;
847
- case ID_AA64MMFR0_PARANGE_44 : return 44 ;
848
- case ID_AA64MMFR0_PARANGE_48 : return 48 ;
849
- case ID_AA64MMFR0_PARANGE_52 : return 52 ;
843
+ case ID_AA64MMFR0_EL1_PARANGE_32 : return 32 ;
844
+ case ID_AA64MMFR0_EL1_PARANGE_36 : return 36 ;
845
+ case ID_AA64MMFR0_EL1_PARANGE_40 : return 40 ;
846
+ case ID_AA64MMFR0_EL1_PARANGE_42 : return 42 ;
847
+ case ID_AA64MMFR0_EL1_PARANGE_44 : return 44 ;
848
+ case ID_AA64MMFR0_EL1_PARANGE_48 : return 48 ;
849
+ case ID_AA64MMFR0_EL1_PARANGE_52 : return 52 ;
850
850
/*
851
851
* A future PE could use a value unknown to the kernel.
852
852
* However, by the "D10.1.4 Principles of the ID scheme
@@ -868,14 +868,14 @@ static inline bool cpu_has_hw_af(void)
868
868
869
869
mmfr1 = read_cpuid (ID_AA64MMFR1_EL1 );
870
870
return cpuid_feature_extract_unsigned_field (mmfr1 ,
871
- ID_AA64MMFR1_HADBS_SHIFT );
871
+ ID_AA64MMFR1_EL1_HAFDBS_SHIFT );
872
872
}
873
873
874
874
static inline bool cpu_has_pan (void )
875
875
{
876
876
u64 mmfr1 = read_cpuid (ID_AA64MMFR1_EL1 );
877
877
return cpuid_feature_extract_unsigned_field (mmfr1 ,
878
- ID_AA64MMFR1_PAN_SHIFT );
878
+ ID_AA64MMFR1_EL1_PAN_SHIFT );
879
879
}
880
880
881
881
#ifdef CONFIG_ARM64_AMU_EXTN
@@ -896,8 +896,8 @@ static inline unsigned int get_vmid_bits(u64 mmfr1)
896
896
int vmid_bits ;
897
897
898
898
vmid_bits = cpuid_feature_extract_unsigned_field (mmfr1 ,
899
- ID_AA64MMFR1_VMIDBITS_SHIFT );
900
- if (vmid_bits == ID_AA64MMFR1_VMIDBITS_16 )
899
+ ID_AA64MMFR1_EL1_VMIDBits_SHIFT );
900
+ if (vmid_bits == ID_AA64MMFR1_EL1_VMIDBits_16 )
901
901
return 16 ;
902
902
903
903
/*
0 commit comments