162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 262306a36Sopenharmony_ci#ifndef _ASM_ARM_TOPOLOGY_H 362306a36Sopenharmony_ci#define _ASM_ARM_TOPOLOGY_H 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci#ifdef CONFIG_ARM_CPU_TOPOLOGY 662306a36Sopenharmony_ci 762306a36Sopenharmony_ci#include <linux/cpumask.h> 862306a36Sopenharmony_ci#include <linux/arch_topology.h> 962306a36Sopenharmony_ci 1062306a36Sopenharmony_ci/* big.LITTLE switcher is incompatible with frequency invariance */ 1162306a36Sopenharmony_ci#ifndef CONFIG_BL_SWITCHER 1262306a36Sopenharmony_ci/* Replace task scheduler's default frequency-invariant accounting */ 1362306a36Sopenharmony_ci#define arch_set_freq_scale topology_set_freq_scale 1462306a36Sopenharmony_ci#define arch_scale_freq_capacity topology_get_freq_scale 1562306a36Sopenharmony_ci#define arch_scale_freq_invariant topology_scale_freq_invariant 1662306a36Sopenharmony_ci#endif 1762306a36Sopenharmony_ci 1862306a36Sopenharmony_ci/* Replace task scheduler's default cpu-invariant accounting */ 1962306a36Sopenharmony_ci#define arch_scale_cpu_capacity topology_get_cpu_scale 2062306a36Sopenharmony_ci 2162306a36Sopenharmony_ci/* Enable topology flag updates */ 2262306a36Sopenharmony_ci#define arch_update_cpu_topology topology_update_cpu_topology 2362306a36Sopenharmony_ci 2462306a36Sopenharmony_ci/* Replace task scheduler's default thermal pressure API */ 2562306a36Sopenharmony_ci#define arch_scale_thermal_pressure topology_get_thermal_pressure 2662306a36Sopenharmony_ci#define arch_update_thermal_pressure topology_update_thermal_pressure 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_ci#else 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_cistatic inline void init_cpu_topology(void) { } 3162306a36Sopenharmony_cistatic inline void store_cpu_topology(unsigned int cpuid) { } 3262306a36Sopenharmony_ci 3362306a36Sopenharmony_ci#endif 3462306a36Sopenharmony_ci 3562306a36Sopenharmony_ci#include <asm-generic/topology.h> 3662306a36Sopenharmony_ci 3762306a36Sopenharmony_ci#endif /* _ASM_ARM_TOPOLOGY_H */ 38