1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef _ASM_ARM_TOPOLOGY_H 3*4882a593Smuzhiyun #define _ASM_ARM_TOPOLOGY_H 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun #ifdef CONFIG_ARM_CPU_TOPOLOGY 6*4882a593Smuzhiyun 7*4882a593Smuzhiyun #include <linux/cpumask.h> 8*4882a593Smuzhiyun #include <linux/arch_topology.h> 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun /* big.LITTLE switcher is incompatible with frequency invariance */ 11*4882a593Smuzhiyun #ifndef CONFIG_BL_SWITCHER 12*4882a593Smuzhiyun /* Replace task scheduler's default frequency-invariant accounting */ 13*4882a593Smuzhiyun #define arch_set_freq_scale topology_set_freq_scale 14*4882a593Smuzhiyun #define arch_scale_freq_capacity topology_get_freq_scale 15*4882a593Smuzhiyun #define arch_scale_freq_invariant topology_scale_freq_invariant 16*4882a593Smuzhiyun #endif 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun /* Replace task scheduler's default cpu-invariant accounting */ 19*4882a593Smuzhiyun #define arch_scale_cpu_capacity topology_get_cpu_scale 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun /* Enable topology flag updates */ 22*4882a593Smuzhiyun #define arch_update_cpu_topology topology_update_cpu_topology 23*4882a593Smuzhiyun 24*4882a593Smuzhiyun /* Replace task scheduler's default thermal pressure API */ 25*4882a593Smuzhiyun #define arch_scale_thermal_pressure topology_get_thermal_pressure 26*4882a593Smuzhiyun #define arch_set_thermal_pressure topology_set_thermal_pressure 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun #else 29*4882a593Smuzhiyun init_cpu_topology(void)30*4882a593Smuzhiyunstatic inline void init_cpu_topology(void) { } store_cpu_topology(unsigned int cpuid)31*4882a593Smuzhiyunstatic inline void store_cpu_topology(unsigned int cpuid) { } 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun #endif 34*4882a593Smuzhiyun 35*4882a593Smuzhiyun #include <asm-generic/topology.h> 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun #endif /* _ASM_ARM_TOPOLOGY_H */ 38