File tree 3 files changed +13
-0
lines changed
3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -1670,6 +1670,7 @@ struct cpuinfo_arm_isa {
1670
1670
bool sve ;
1671
1671
bool sve2 ;
1672
1672
bool i8mm ;
1673
+ bool sme ;
1673
1674
uint32_t svelen ;
1674
1675
#endif
1675
1676
bool rdm ;
@@ -2052,6 +2053,14 @@ static inline uint32_t cpuinfo_get_max_arm_sve_length(void) {
2052
2053
#endif
2053
2054
}
2054
2055
2056
+ static inline bool cpuinfo_has_arm_sme (void ) {
2057
+ #if CPUINFO_ARCH_ARM64
2058
+ return cpuinfo_isa .sme ;
2059
+ #else
2060
+ return false;
2061
+ #endif
2062
+ }
2063
+
2055
2064
#if CPUINFO_ARCH_RISCV32 || CPUINFO_ARCH_RISCV64
2056
2065
/* This structure is not a part of stable API. Use cpuinfo_has_riscv_* functions
2057
2066
* instead. */
Original file line number Diff line number Diff line change @@ -144,6 +144,9 @@ void cpuinfo_arm64_linux_decode_isa_from_proc_cpuinfo(
144
144
if (features2 & CPUINFO_ARM_LINUX_FEATURE2_SVE2 ) {
145
145
isa -> sve2 = true;
146
146
}
147
+ if (features2 & CPUINFO_ARM_LINUX_FEATURE2_SME ) {
148
+ isa -> sme = true;
149
+ }
147
150
// SVEBF16 is set iff SVE and BF16 are both supported, but the SVEBF16
148
151
// feature flag was added in Linux kernel before the BF16 feature flag,
149
152
// so we check for either.
Original file line number Diff line number Diff line change @@ -137,6 +137,7 @@ struct cpuinfo_arm_linux_proc_cpuinfo_cache {
137
137
#define CPUINFO_ARM_LINUX_FEATURE2_DGH UINT32_C(0x00008000)
138
138
#define CPUINFO_ARM_LINUX_FEATURE2_RNG UINT32_C(0x00010000)
139
139
#define CPUINFO_ARM_LINUX_FEATURE2_BTI UINT32_C(0x00020000)
140
+ #define CPUINFO_ARM_LINUX_FEATURE2_SME UINT32_C(0x00800000)
140
141
#endif
141
142
142
143
#define CPUINFO_ARM_LINUX_VALID_ARCHITECTURE UINT32_C(0x00010000)
You can’t perform that action at this time.
0 commit comments