Skip to content

Commit 7ab06ea

Browse files
Yicong Yangwilldeacon
authored andcommitted
arch_topology: Provide a stub topology_core_has_smt() for !CONFIG_GENERIC_ARCH_TOPOLOGY
The arm_pmu driver is using topology_core_has_smt() for retrieving the SMT implementation which depends on CONFIG_GENERIC_ARCH_TOPOLOGY. The config is optional on arm platforms so provide a !CONFIG_GENERIC_ARCH_TOPOLOGY stub for topology_core_has_smt(). Fixes: c3d78c3 ("perf: arm_pmuv3: Don't use PMCCNTR_EL0 on SMT cores") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202511041757.vuCGOmFc-lkp@intel.com/ Suggested-by: Will Deacon <will@kernel.org> Signed-off-by: Yicong Yang <yangyccccc@gmail.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Will Deacon <will@kernel.org>
1 parent 2d7a824 commit 7ab06ea

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

include/linux/arch_topology.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ static inline bool topology_core_has_smt(int cpu)
100100
return cpu_topology[cpu].thread_id != -1;
101101
}
102102

103-
#endif
103+
#else
104+
105+
static inline bool topology_core_has_smt(int cpu) { return false; }
106+
107+
#endif /* CONFIG_GENERIC_ARCH_TOPOLOGY */
104108

105109
#endif /* _LINUX_ARCH_TOPOLOGY_H_ */

0 commit comments

Comments
 (0)