Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __ASM_TOPOLOGY_H
0003 #define __ASM_TOPOLOGY_H
0004 
0005 #include <linux/cpumask.h>
0006 
0007 #ifdef CONFIG_NUMA
0008 
0009 struct pci_bus;
0010 int pcibus_to_node(struct pci_bus *bus);
0011 #define cpumask_of_pcibus(bus)  (pcibus_to_node(bus) == -1 ?        \
0012                  cpu_all_mask :             \
0013                  cpumask_of_node(pcibus_to_node(bus)))
0014 
0015 #endif /* CONFIG_NUMA */
0016 
0017 #include <linux/arch_topology.h>
0018 
0019 void update_freq_counters_refs(void);
0020 
0021 /* Replace task scheduler's default frequency-invariant accounting */
0022 #define arch_scale_freq_tick topology_scale_freq_tick
0023 #define arch_set_freq_scale topology_set_freq_scale
0024 #define arch_scale_freq_capacity topology_get_freq_scale
0025 #define arch_scale_freq_invariant topology_scale_freq_invariant
0026 
0027 #ifdef CONFIG_ACPI_CPPC_LIB
0028 #define arch_init_invariance_cppc topology_init_cpu_capacity_cppc
0029 #endif
0030 
0031 /* Replace task scheduler's default cpu-invariant accounting */
0032 #define arch_scale_cpu_capacity topology_get_cpu_scale
0033 
0034 /* Enable topology flag updates */
0035 #define arch_update_cpu_topology topology_update_cpu_topology
0036 
0037 /* Replace task scheduler's default thermal pressure API */
0038 #define arch_scale_thermal_pressure topology_get_thermal_pressure
0039 #define arch_update_thermal_pressure    topology_update_thermal_pressure
0040 
0041 #include <asm-generic/topology.h>
0042 
0043 #endif /* _ASM_ARM_TOPOLOGY_H */