numa.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef __ASM_NUMA_H
  2. #define __ASM_NUMA_H
  3. #include <asm/topology.h>
  4. #ifdef CONFIG_NUMA
  5. #define NR_NODE_MEMBLKS (MAX_NUMNODES * 2)
  6. /* currently, arm64 implements flat NUMA topology */
  7. #define parent_node(node) (node)
  8. int __node_distance(int from, int to);
  9. #define node_distance(a, b) __node_distance(a, b)
  10. extern nodemask_t numa_nodes_parsed __initdata;
  11. /* Mappings between node number and cpus on that node. */
  12. extern cpumask_var_t node_to_cpumask_map[MAX_NUMNODES];
  13. void numa_clear_node(unsigned int cpu);
  14. #ifdef CONFIG_DEBUG_PER_CPU_MAPS
  15. const struct cpumask *cpumask_of_node(int node);
  16. #else
  17. /* Returns a pointer to the cpumask of CPUs on Node 'node'. */
  18. static inline const struct cpumask *cpumask_of_node(int node)
  19. {
  20. return node_to_cpumask_map[node];
  21. }
  22. #endif
  23. void __init arm64_numa_init(void);
  24. int __init numa_add_memblk(int nodeid, u64 start, u64 end);
  25. void __init numa_set_distance(int from, int to, int distance);
  26. void __init numa_free_distance(void);
  27. void __init early_map_cpu_to_node(unsigned int cpu, int nid);
  28. void numa_store_cpu_info(unsigned int cpu);
  29. #else /* CONFIG_NUMA */
  30. static inline void numa_store_cpu_info(unsigned int cpu) { }
  31. static inline void arm64_numa_init(void) { }
  32. static inline void early_map_cpu_to_node(unsigned int cpu, int nid) { }
  33. #endif /* CONFIG_NUMA */
  34. #endif /* __ASM_NUMA_H */