File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -1341,7 +1341,8 @@ void cpuinfo_arm_decode_cache(
13411341 * information, please refer to the technical manuals
13421342 * linked above
13431343 */
1344- const uint32_t min_l2_size_KB = uarch == cpuinfo_uarch_neoverse_v2 ? 1024 : 256 ;
1344+ const uint32_t min_l2_size_KB =
1345+ (uarch == cpuinfo_uarch_neoverse_v2 || midr_is_ampere_altra (midr )) ? 1024 : 256 ;
13451346 const uint32_t min_l3_size_KB = 0 ;
13461347
13471348 * l1i = (struct cpuinfo_cache ){
Original file line number Diff line number Diff line change 3434#define CPUINFO_ARM_MIDR_KRYO_SILVER_820 UINT32_C(0x510F2110)
3535#define CPUINFO_ARM_MIDR_EXYNOS_M1_M2 UINT32_C(0x530F0010)
3636#define CPUINFO_ARM_MIDR_DENVER2 UINT32_C(0x4E0F0030)
37+ #define CPUINFO_ARM_MIDR_AMPERE_ALTRA UINT32_C(0x413fd0c1)
3738
3839inline static uint32_t midr_set_implementer (uint32_t midr , uint32_t implementer ) {
3940 return (midr & ~CPUINFO_ARM_MIDR_IMPLEMENTER_MASK ) |
@@ -167,6 +168,11 @@ inline static bool midr_is_kryo_gold(uint32_t midr) {
167168 return (midr & uarch_mask ) == (CPUINFO_ARM_MIDR_KRYO_GOLD & uarch_mask );
168169}
169170
171+ inline static bool midr_is_ampere_altra (uint32_t midr ) {
172+ const uint32_t uarch_mask = CPUINFO_ARM_MIDR_IMPLEMENTER_MASK | CPUINFO_ARM_MIDR_PART_MASK ;
173+ return (midr & uarch_mask ) == (CPUINFO_ARM_MIDR_AMPERE_ALTRA & uarch_mask );
174+ }
175+
170176inline static uint32_t midr_score_core (uint32_t midr ) {
171177 const uint32_t core_mask = CPUINFO_ARM_MIDR_IMPLEMENTER_MASK | CPUINFO_ARM_MIDR_PART_MASK ;
172178 switch (midr & core_mask ) {
You can’t perform that action at this time.
0 commit comments