aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/include/asm/mach-loongson/topology.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/include/asm/mach-loongson/topology.h')
-rw-r--r--arch/mips/include/asm/mach-loongson/topology.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/arch/mips/include/asm/mach-loongson/topology.h b/arch/mips/include/asm/mach-loongson/topology.h
new file mode 100644
index 000000000000..5598ba77d2ef
--- /dev/null
+++ b/arch/mips/include/asm/mach-loongson/topology.h
@@ -0,0 +1,23 @@
1#ifndef _ASM_MACH_TOPOLOGY_H
2#define _ASM_MACH_TOPOLOGY_H
3
4#ifdef CONFIG_NUMA
5
6#define cpu_to_node(cpu) ((cpu) >> 2)
7#define parent_node(node) (node)
8#define cpumask_of_node(node) (&__node_data[(node)]->cpumask)
9
10struct pci_bus;
11extern int pcibus_to_node(struct pci_bus *);
12
13#define cpumask_of_pcibus(bus) (cpu_online_mask)
14
15extern unsigned char __node_distances[MAX_NUMNODES][MAX_NUMNODES];
16
17#define node_distance(from, to) (__node_distances[(from)][(to)])
18
19#endif
20
21#include <asm-generic/topology.h>
22
23#endif /* _ASM_MACH_TOPOLOGY_H */