1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef _ASM_MACH_TOPOLOGY_H 3#define _ASM_MACH_TOPOLOGY_H 4 5#ifdef CONFIG_NUMA 6 7extern cpumask_t cpus_on_node[]; 8 9#define cpumask_of_node(node) (&cpus_on_node[node]) 10 11struct pci_bus; 12extern int pcibus_to_node(struct pci_bus *); 13 14#define cpumask_of_pcibus(bus) (cpu_online_mask) 15 16extern unsigned char node_distances[MAX_NUMNODES][MAX_NUMNODES]; 17 18void numa_set_distance(int from, int to, int distance); 19 20#define node_distance(from, to) (node_distances[(from)][(to)]) 21 22#else 23#define pcibus_to_node(bus) 0 24#endif 25 26#endif /* _ASM_MACH_TOPOLOGY_H */ 27