topology.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #ifndef _ASM_POWERPC_TOPOLOGY_H
  2. #define _ASM_POWERPC_TOPOLOGY_H
  3. #include <linux/config.h>
  4. #ifdef CONFIG_NUMA
  5. #include <asm/mmzone.h>
  6. static inline int cpu_to_node(int cpu)
  7. {
  8. return numa_cpu_lookup_table[cpu];
  9. }
  10. #define parent_node(node) (node)
  11. static inline cpumask_t node_to_cpumask(int node)
  12. {
  13. return numa_cpumask_lookup_table[node];
  14. }
  15. static inline int node_to_first_cpu(int node)
  16. {
  17. cpumask_t tmp;
  18. tmp = node_to_cpumask(node);
  19. return first_cpu(tmp);
  20. }
  21. #define pcibus_to_node(node) (-1)
  22. #define pcibus_to_cpumask(bus) (cpu_online_map)
  23. /* sched_domains SD_NODE_INIT for PPC64 machines */
  24. #define SD_NODE_INIT (struct sched_domain) { \
  25. .span = CPU_MASK_NONE, \
  26. .parent = NULL, \
  27. .groups = NULL, \
  28. .min_interval = 8, \
  29. .max_interval = 32, \
  30. .busy_factor = 32, \
  31. .imbalance_pct = 125, \
  32. .cache_hot_time = (10*1000000), \
  33. .cache_nice_tries = 1, \
  34. .per_cpu_gain = 100, \
  35. .flags = SD_LOAD_BALANCE \
  36. | SD_BALANCE_EXEC \
  37. | SD_BALANCE_NEWIDLE \
  38. | SD_WAKE_IDLE \
  39. | SD_WAKE_BALANCE, \
  40. .last_balance = jiffies, \
  41. .balance_interval = 1, \
  42. .nr_balance_failed = 0, \
  43. }
  44. #else
  45. #include <asm-generic/topology.h>
  46. #endif /* CONFIG_NUMA */
  47. #endif /* _ASM_POWERPC_TOPOLOGY_H */