topology.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 cpumask_of_node(node) (&hub_data(node)->h_cpus)
  24. struct pci_bus;
  25. extern int pcibus_to_node(struct pci_bus *);
  26. #define cpumask_of_pcibus(bus) (cpu_online_mask)
  27. extern unsigned char __node_distances[MAX_COMPACT_NODES][MAX_COMPACT_NODES];
  28. #define node_distance(from, to) (__node_distances[(from)][(to)])
  29. /* sched_domains SD_NODE_INIT for SGI IP27 machines */
  30. #define SD_NODE_INIT (struct sched_domain) { \
  31. .parent = NULL, \
  32. .child = NULL, \
  33. .groups = NULL, \
  34. .min_interval = 8, \
  35. .max_interval = 32, \
  36. .busy_factor = 32, \
  37. .imbalance_pct = 125, \
  38. .cache_nice_tries = 1, \
  39. .flags = SD_LOAD_BALANCE | \
  40. SD_BALANCE_EXEC, \
  41. .last_balance = jiffies, \
  42. .balance_interval = 1, \
  43. .nr_balance_failed = 0, \
  44. }
  45. #include <asm-generic/topology.h>
  46. #endif /* _ASM_MACH_TOPOLOGY_H */