Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _ASM_ARM_TOPOLOGY_H
0003 #define _ASM_ARM_TOPOLOGY_H
0004 
0005 #ifdef CONFIG_ARM_CPU_TOPOLOGY
0006 
0007 #include <linux/cpumask.h>
0008 #include <linux/arch_topology.h>
0009 
0010 /* big.LITTLE switcher is incompatible with frequency invariance */
0011 #ifndef CONFIG_BL_SWITCHER
0012 /* Replace task scheduler's default frequency-invariant accounting */
0013 #define arch_set_freq_scale topology_set_freq_scale
0014 #define arch_scale_freq_capacity topology_get_freq_scale
0015 #define arch_scale_freq_invariant topology_scale_freq_invariant
0016 #endif
0017 
0018 /* Replace task scheduler's default cpu-invariant accounting */
0019 #define arch_scale_cpu_capacity topology_get_cpu_scale
0020 
0021 /* Enable topology flag updates */
0022 #define arch_update_cpu_topology topology_update_cpu_topology
0023 
0024 /* Replace task scheduler's default thermal pressure API */
0025 #define arch_scale_thermal_pressure topology_get_thermal_pressure
0026 #define arch_update_thermal_pressure    topology_update_thermal_pressure
0027 
0028 #else
0029 
0030 static inline void init_cpu_topology(void) { }
0031 static inline void store_cpu_topology(unsigned int cpuid) { }
0032 
0033 #endif
0034 
0035 #include <asm-generic/topology.h>
0036 
0037 #endif /* _ASM_ARM_TOPOLOGY_H */