18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef _ASM_ARM_TOPOLOGY_H 38c2ecf20Sopenharmony_ci#define _ASM_ARM_TOPOLOGY_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#ifdef CONFIG_ARM_CPU_TOPOLOGY 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#include <linux/cpumask.h> 88c2ecf20Sopenharmony_ci#include <linux/arch_topology.h> 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ci/* big.LITTLE switcher is incompatible with frequency invariance */ 118c2ecf20Sopenharmony_ci#ifndef CONFIG_BL_SWITCHER 128c2ecf20Sopenharmony_ci/* Replace task scheduler's default frequency-invariant accounting */ 138c2ecf20Sopenharmony_ci#define arch_set_freq_scale topology_set_freq_scale 148c2ecf20Sopenharmony_ci#define arch_scale_freq_capacity topology_get_freq_scale 158c2ecf20Sopenharmony_ci#define arch_scale_freq_invariant topology_scale_freq_invariant 168c2ecf20Sopenharmony_ci#endif 178c2ecf20Sopenharmony_ci 188c2ecf20Sopenharmony_ci/* Replace task scheduler's default cpu-invariant accounting */ 198c2ecf20Sopenharmony_ci#define arch_scale_cpu_capacity topology_get_cpu_scale 208c2ecf20Sopenharmony_ci 218c2ecf20Sopenharmony_ci/* Enable topology flag updates */ 228c2ecf20Sopenharmony_ci#define arch_update_cpu_topology topology_update_cpu_topology 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci/* Replace task scheduler's default thermal pressure API */ 258c2ecf20Sopenharmony_ci#define arch_scale_thermal_pressure topology_get_thermal_pressure 268c2ecf20Sopenharmony_ci#define arch_set_thermal_pressure topology_set_thermal_pressure 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci#else 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_cistatic inline void init_cpu_topology(void) { } 318c2ecf20Sopenharmony_cistatic inline void store_cpu_topology(unsigned int cpuid) { } 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#endif 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci#include <asm-generic/topology.h> 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ci#endif /* _ASM_ARM_TOPOLOGY_H */ 38