drm/nouveau: consume the return of large GSP message
[drm/drm-misc.git] / arch / loongarch / include / asm / topology.h
blob50273c9187d020430008e31d2489a5c9978b62c1
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
4 */
5 #ifndef __ASM_TOPOLOGY_H
6 #define __ASM_TOPOLOGY_H
8 #include <linux/smp.h>
10 #ifdef CONFIG_NUMA
11 #include <asm/numa.h>
13 extern cpumask_t cpus_on_node[];
15 #define cpumask_of_node(node) (&cpus_on_node[node])
17 struct pci_bus;
18 extern int pcibus_to_node(struct pci_bus *);
20 #define cpumask_of_pcibus(bus) (cpu_online_mask)
22 extern unsigned char node_distances[MAX_NUMNODES][MAX_NUMNODES];
24 void numa_set_distance(int from, int to, int distance);
26 #define node_distance(from, to) (node_distances[(from)][(to)])
28 #else
29 #define pcibus_to_node(bus) 0
30 #endif
32 #ifdef CONFIG_SMP
33 #define topology_physical_package_id(cpu) (cpu_data[cpu].package)
34 #define topology_core_id(cpu) (cpu_data[cpu].core)
35 #define topology_core_cpumask(cpu) (&cpu_core_map[cpu])
36 #define topology_sibling_cpumask(cpu) (&cpu_sibling_map[cpu])
37 #endif
39 #include <asm-generic/topology.h>
41 static inline void arch_fix_phys_package_id(int num, u32 slot) { }
42 #endif /* __ASM_TOPOLOGY_H */