File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 6060#define ARM64_HAS_ADDRESS_AUTH_IMP_DEF 39
6161#define ARM64_HAS_GENERIC_AUTH_ARCH 40
6262#define ARM64_HAS_GENERIC_AUTH_IMP_DEF 41
63+ #define ARM64_HAS_IRQ_PRIO_MASKING 42
6364
64- #define ARM64_NCAPS 42
65+ #define ARM64_NCAPS 43
6566
6667#endif /* __ASM_CPUCAPS_H */
Original file line number Diff line number Diff line change @@ -612,6 +612,12 @@ static inline bool system_supports_generic_auth(void)
612612 cpus_have_const_cap (ARM64_HAS_GENERIC_AUTH_IMP_DEF ));
613613}
614614
615+ static inline bool system_uses_irq_prio_masking (void )
616+ {
617+ return IS_ENABLED (CONFIG_ARM64_PSEUDO_NMI ) &&
618+ cpus_have_const_cap (ARM64_HAS_IRQ_PRIO_MASKING );
619+ }
620+
615621#define ARM64_SSBD_UNKNOWN -1
616622#define ARM64_SSBD_FORCE_DISABLE 0
617623#define ARM64_SSBD_KERNEL 1
Original file line number Diff line number Diff line change @@ -1203,6 +1203,14 @@ static void cpu_enable_address_auth(struct arm64_cpu_capabilities const *cap)
12031203}
12041204#endif /* CONFIG_ARM64_PTR_AUTH */
12051205
1206+ #ifdef CONFIG_ARM64_PSEUDO_NMI
1207+ static bool can_use_gic_priorities (const struct arm64_cpu_capabilities * entry ,
1208+ int scope )
1209+ {
1210+ return false;
1211+ }
1212+ #endif
1213+
12061214static const struct arm64_cpu_capabilities arm64_features [] = {
12071215 {
12081216 .desc = "GIC system register CPU interface" ,
@@ -1480,6 +1488,21 @@ static const struct arm64_cpu_capabilities arm64_features[] = {
14801488 .matches = has_cpuid_feature ,
14811489 },
14821490#endif /* CONFIG_ARM64_PTR_AUTH */
1491+ #ifdef CONFIG_ARM64_PSEUDO_NMI
1492+ {
1493+ /*
1494+ * Depends on having GICv3
1495+ */
1496+ .desc = "IRQ priority masking" ,
1497+ .capability = ARM64_HAS_IRQ_PRIO_MASKING ,
1498+ .type = ARM64_CPUCAP_STRICT_BOOT_CPU_FEATURE ,
1499+ .matches = can_use_gic_priorities ,
1500+ .sys_reg = SYS_ID_AA64PFR0_EL1 ,
1501+ .field_pos = ID_AA64PFR0_GIC_SHIFT ,
1502+ .sign = FTR_UNSIGNED ,
1503+ .min_field_value = 1 ,
1504+ },
1505+ #endif
14831506 {},
14841507};
14851508
You can’t perform that action at this time.
0 commit comments