Merge branch 'x86-pti-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux-2.6-block.git] / arch / mips / include / asm / mach-ip27 / topology.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
1da177e4
LT
2#ifndef _ASM_MACH_TOPOLOGY_H
3#define _ASM_MACH_TOPOLOGY_H 1
4
1da177e4 5#include <asm/sn/hub.h>
cc6e8e08 6#include <asm/sn/types.h>
1da177e4
LT
7#include <asm/mmzone.h>
8
cc6e8e08 9struct cpuinfo_ip27 {
cc6e8e08
RB
10 nasid_t p_nasid; /* my node ID in numa-as-id-space */
11 unsigned char p_slice; /* Physical position on node board */
cc6e8e08
RB
12};
13
14extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
15
4bf841eb 16#define cpu_to_node(cpu) (cputonasid(cpu))
d797396f
AB
17#define cpumask_of_node(node) ((node) == -1 ? \
18 cpu_all_mask : \
19 &hub_data(node)->h_cpus)
9dbdfce8
RB
20struct pci_bus;
21extern int pcibus_to_node(struct pci_bus *);
22
a57140e9 23#define cpumask_of_pcibus(bus) (cpumask_of_node(pcibus_to_node(bus)))
1da177e4 24
c80b4896 25extern unsigned char __node_distances[MAX_NUMNODES][MAX_NUMNODES];
1da177e4 26
70342287 27#define node_distance(from, to) (__node_distances[(from)][(to)])
1da177e4 28
a4a8f70d
AB
29#include <asm-generic/topology.h>
30
1da177e4 31#endif /* _ASM_MACH_TOPOLOGY_H */