Commit 7ab06ea4 authored by Yicong Yang's avatar Yicong Yang Committed by Will Deacon
Browse files

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: c3d78c34 ("perf: arm_pmuv3: Don't use PMCCNTR_EL0 on SMT cores")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511041757.vuCGOmFc-lkp@intel.com/


Suggested-by: default avatarWill Deacon <will@kernel.org>
Signed-off-by: default avatarYicong Yang <yangyccccc@gmail.com>
Reviewed-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarWill Deacon <will@kernel.org>
parent 2d7a8248
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -100,6 +100,10 @@ static inline bool topology_core_has_smt(int cpu)
	return cpu_topology[cpu].thread_id != -1;
}

#endif
#else

static inline bool topology_core_has_smt(int cpu) { return false; }

#endif /* CONFIG_GENERIC_ARCH_TOPOLOGY */

#endif /* _LINUX_ARCH_TOPOLOGY_H_ */