topology.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_MACH_TOPOLOGY_H
  3. #define _ASM_MACH_TOPOLOGY_H 1
  4. #include <asm/sn/hub.h>
  5. #include <asm/sn/types.h>
  6. #include <asm/mmzone.h>
  7. struct cpuinfo_ip27 {
  8. // cpuid_t p_cpuid; /* PROM assigned cpuid */
  9. cnodeid_t p_nodeid; /* my node ID in compact-id-space */
  10. nasid_t p_nasid; /* my node ID in numa-as-id-space */
  11. unsigned char p_slice; /* Physical position on node board */
  12. #if 0
  13. unsigned long loops_per_sec;
  14. unsigned long ipi_count;
  15. unsigned long irq_attempt[NR_IRQS];
  16. unsigned long smp_local_irq_count;
  17. unsigned long prof_multiplier;
  18. unsigned long prof_counter;
  19. #endif
  20. };
  21. extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
  22. #define cpu_to_node(cpu) (sn_cpu_info[(cpu)].p_nodeid)
  23. #define cpumask_of_node(node) ((node) == -1 ? \
  24. cpu_all_mask : \
  25. &hub_data(node)->h_cpus)
  26. struct pci_bus;
  27. extern int pcibus_to_node(struct pci_bus *);
  28. #define cpumask_of_pcibus(bus) (cpu_online_mask)
  29. extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
  30. #define node_distance(from, to) (__node_distances[(from)][(to)])
  31. #include <asm-generic/topology.h>
  32. #endif /* _ASM_MACH_TOPOLOGY_H */