topology.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __ASM_TOPOLOGY_H
  3. #define __ASM_TOPOLOGY_H
  4. #include <linux/cpumask.h>
  5. #ifdef CONFIG_NUMA
  6. #include <asm/numa.h>
  7. struct pci_bus;
  8. int pcibus_to_node(struct pci_bus *bus);
  9. #define cpumask_of_pcibus(bus) (pcibus_to_node(bus) == -1 ? \
  10. cpu_all_mask : \
  11. cpumask_of_node(pcibus_to_node(bus)))
  12. #endif /* CONFIG_NUMA */
  13. #include <linux/arch_topology.h>
  14. void update_freq_counters_refs(void);
  15. /* Replace task scheduler's default frequency-invariant accounting */
  16. #define arch_scale_freq_tick topology_scale_freq_tick
  17. #define arch_set_freq_scale topology_set_freq_scale
  18. #define arch_scale_freq_capacity topology_get_freq_scale
  19. #define arch_scale_freq_invariant topology_scale_freq_invariant
  20. #define arch_scale_freq_ref topology_get_freq_ref
  21. /* Replace task scheduler's default cpu-invariant accounting */
  22. #define arch_scale_cpu_capacity topology_get_cpu_scale
  23. /* Enable topology flag updates */
  24. #define arch_update_cpu_topology topology_update_cpu_topology
  25. /* Replace task scheduler's default HW pressure API */
  26. #define arch_scale_hw_pressure topology_get_hw_pressure
  27. #define arch_update_hw_pressure topology_update_hw_pressure
  28. #include <asm-generic/topology.h>
  29. #endif /* _ASM_ARM_TOPOLOGY_H */