Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _ASM_MACH_TOPOLOGY_H
0003 #define _ASM_MACH_TOPOLOGY_H    1
0004 
0005 #include <asm/sn/types.h>
0006 #include <asm/mmzone.h>
0007 
0008 struct cpuinfo_ip27 {
0009     nasid_t     p_nasid;    /* my node ID in numa-as-id-space */
0010     unsigned short  p_speed;    /* cpu speed in MHz */
0011     unsigned char   p_slice;    /* Physical position on node board */
0012 };
0013 
0014 extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
0015 
0016 #define cpu_to_node(cpu)    (cputonasid(cpu))
0017 #define cpumask_of_node(node)   ((node) == -1 ?             \
0018                  cpu_all_mask :             \
0019                  &hub_data(node)->h_cpus)
0020 struct pci_bus;
0021 extern int pcibus_to_node(struct pci_bus *);
0022 
0023 #define cpumask_of_pcibus(bus)  (cpumask_of_node(pcibus_to_node(bus)))
0024 
0025 extern unsigned char __node_distances[MAX_NUMNODES][MAX_NUMNODES];
0026 
0027 #define node_distance(from, to) (__node_distances[(from)][(to)])
0028 
0029 #include <asm-generic/topology.h>
0030 
0031 #endif /* _ASM_MACH_TOPOLOGY_H */