]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - arch/mips/include/asm/mach-ip27/topology.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.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
RB
9struct cpuinfo_ip27 {
10// cpuid_t p_cpuid; /* PROM assigned cpuid */
11 cnodeid_t p_nodeid; /* my node ID in compact-id-space */
12 nasid_t p_nasid; /* my node ID in numa-as-id-space */
13 unsigned char p_slice; /* Physical position on node board */
14#if 0
15 unsigned long loops_per_sec;
16 unsigned long ipi_count;
17 unsigned long irq_attempt[NR_IRQS];
18 unsigned long smp_local_irq_count;
19 unsigned long prof_multiplier;
20 unsigned long prof_counter;
21#endif
22};
23
24extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
25
26#define cpu_to_node(cpu) (sn_cpu_info[(cpu)].p_nodeid)
d797396f
AB
27#define cpumask_of_node(node) ((node) == -1 ? \
28 cpu_all_mask : \
29 &hub_data(node)->h_cpus)
9dbdfce8
RB
30struct pci_bus;
31extern int pcibus_to_node(struct pci_bus *);
32
b4a2f916 33#define cpumask_of_pcibus(bus) (cpu_online_mask)
1da177e4
LT
34
35extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
36
70342287 37#define node_distance(from, to) (__node_distances[(from)][(to)])
1da177e4 38
a4a8f70d
AB
39#include <asm-generic/topology.h>
40
1da177e4 41#endif /* _ASM_MACH_TOPOLOGY_H */