arch_topology: Provide a stub topology_core_has_smt() for !CONFIG_GENERIC_ARCH_TOPOLOGY
PATCH v2 1/1 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().
---
Change since v1:
- use a stub rather than guard the user with #ifdef block.
include/linux/arch_topology.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
include/linux/arch_topology.h +5 -1
@@ -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_ */
Signature · 1 line
2.50.1 (Apple Git-155)
Quoted 4 lines · Yicong Yang
The
arm_pmudriver is usingtopology_core_has_smt()for retrieving the SMT implementation which depends onCONFIG_GENERIC_ARCH_TOPOLOGY. The config is optional on arm platforms so provide a !CONFIG_GENERIC_ARCH_TOPOLOGY stub fortopology_core_has_smt().
Will Deacon
AppliedQuoted 6 lines · Yicong Yang
The
arm_pmudriver is usingtopology_core_has_smt()for retrieving the SMT implementation which depends onCONFIG_GENERIC_ARCH_TOPOLOGY. The config is optional on arm platforms so provide a !CONFIG_GENERIC_ARCH_TOPOLOGY stub fortopology_core_has_smt().
Applied to will (for-next/perf), thanks!
[1/1] arch_topology: Provide a stub topology_core_has_smt() for !CONFIG_GENERIC_ARCH_TOPOLOGY
https://git.kernel.org/will/c/7ab06ea41af5
Cheers,
Signature · 5 lines
Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev