18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef __ASM_TOPOLOGY_H 38c2ecf20Sopenharmony_ci#define __ASM_TOPOLOGY_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <linux/cpumask.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci#ifdef CONFIG_NUMA 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_cistruct pci_bus; 108c2ecf20Sopenharmony_ciint pcibus_to_node(struct pci_bus *bus); 118c2ecf20Sopenharmony_ci#define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \ 128c2ecf20Sopenharmony_ci cpu_all_mask : \ 138c2ecf20Sopenharmony_ci cpumask_of_node(pcibus_to_node(bus))) 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ci#endif /* CONFIG_NUMA */ 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci#include <linux/arch_topology.h> 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#ifdef CONFIG_ARM64_AMU_EXTN 208c2ecf20Sopenharmony_ci/* 218c2ecf20Sopenharmony_ci * Replace task scheduler's default counter-based 228c2ecf20Sopenharmony_ci * frequency-invariance scale factor setting. 238c2ecf20Sopenharmony_ci */ 248c2ecf20Sopenharmony_civoid topology_scale_freq_tick(void); 258c2ecf20Sopenharmony_ci#define arch_scale_freq_tick topology_scale_freq_tick 268c2ecf20Sopenharmony_ci#endif /* CONFIG_ARM64_AMU_EXTN */ 278c2ecf20Sopenharmony_ci 288c2ecf20Sopenharmony_ci/* Replace task scheduler's default frequency-invariant accounting */ 298c2ecf20Sopenharmony_ci#define arch_set_freq_scale topology_set_freq_scale 308c2ecf20Sopenharmony_ci#define arch_scale_freq_capacity topology_get_freq_scale 318c2ecf20Sopenharmony_ci#define arch_scale_freq_invariant topology_scale_freq_invariant 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci/* Replace task scheduler's default cpu-invariant accounting */ 348c2ecf20Sopenharmony_ci#define arch_scale_cpu_capacity topology_get_cpu_scale 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ci/* Enable topology flag updates */ 378c2ecf20Sopenharmony_ci#define arch_update_cpu_topology topology_update_cpu_topology 388c2ecf20Sopenharmony_ci 398c2ecf20Sopenharmony_ci/* Replace task scheduler's default thermal pressure API */ 408c2ecf20Sopenharmony_ci#define arch_scale_thermal_pressure topology_get_thermal_pressure 418c2ecf20Sopenharmony_ci#define arch_set_thermal_pressure topology_set_thermal_pressure 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci#include <asm-generic/topology.h> 448c2ecf20Sopenharmony_ci 458c2ecf20Sopenharmony_ci#endif /* _ASM_ARM_TOPOLOGY_H */ 46