topology.h 585 B

12345678910111213141516171819202122232425
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_MACH_TOPOLOGY_H
  3. #define _ASM_MACH_TOPOLOGY_H
  4. #ifdef CONFIG_NUMA
  5. #define cpu_to_node(cpu) (cpu_logical_map(cpu) >> 2)
  6. extern cpumask_t __node_cpumask[];
  7. #define cpumask_of_node(node) (&__node_cpumask[node])
  8. struct pci_bus;
  9. extern int pcibus_to_node(struct pci_bus *);
  10. #define cpumask_of_pcibus(bus) (cpu_online_mask)
  11. extern unsigned char __node_distances[MAX_NUMNODES][MAX_NUMNODES];
  12. #define node_distance(from, to) (__node_distances[(from)][(to)])
  13. #endif
  14. #include <asm-generic/topology.h>
  15. #endif /* _ASM_MACH_TOPOLOGY_H */