topology.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef _ASM_MACH_TOPOLOGY_H
  2. #define _ASM_MACH_TOPOLOGY_H 1
  3. #include <asm/sn/hub.h>
  4. #include <asm/sn/types.h>
  5. #include <asm/mmzone.h>
  6. struct cpuinfo_ip27 {
  7. // cpuid_t p_cpuid; /* PROM assigned cpuid */
  8. cnodeid_t p_nodeid; /* my node ID in compact-id-space */
  9. nasid_t p_nasid; /* my node ID in numa-as-id-space */
  10. unsigned char p_slice; /* Physical position on node board */
  11. #if 0
  12. unsigned long loops_per_sec;
  13. unsigned long ipi_count;
  14. unsigned long irq_attempt[NR_IRQS];
  15. unsigned long smp_local_irq_count;
  16. unsigned long prof_multiplier;
  17. unsigned long prof_counter;
  18. #endif
  19. };
  20. extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
  21. #define cpu_to_node(cpu) (sn_cpu_info[(cpu)].p_nodeid)
  22. #define parent_node(node) (node)
  23. #define node_to_cpumask(node) (hub_data(node)->h_cpus)
  24. #define cpumask_of_node(node) (&hub_data(node)->h_cpus)
  25. struct pci_bus;
  26. extern int pcibus_to_node(struct pci_bus *);
  27. #define pcibus_to_cpumask(bus) (cpu_online_map)
  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. /* sched_domains SD_NODE_INIT for SGI IP27 machines */
  32. #define SD_NODE_INIT (struct sched_domain) { \
  33. .parent = NULL, \
  34. .child = NULL, \
  35. .groups = NULL, \
  36. .min_interval = 8, \
  37. .max_interval = 32, \
  38. .busy_factor = 32, \
  39. .imbalance_pct = 125, \
  40. .cache_nice_tries = 1, \
  41. .flags = SD_LOAD_BALANCE \
  42. | SD_BALANCE_EXEC \
  43. | SD_WAKE_BALANCE, \
  44. .last_balance = jiffies, \
  45. .balance_interval = 1, \
  46. .nr_balance_failed = 0, \
  47. }
  48. #include <asm-generic/topology.h>
  49. #endif /* _ASM_MACH_TOPOLOGY_H */