numa_64.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #ifndef _ASM_X86_NUMA_64_H
  2. #define _ASM_X86_NUMA_64_H
  3. #include <linux/nodemask.h>
  4. struct bootnode {
  5. u64 start;
  6. u64 end;
  7. };
  8. extern int compute_hash_shift(struct bootnode *nodes, int numblks,
  9. int *nodeids);
  10. #define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT))
  11. extern void numa_init_array(void);
  12. extern int numa_off;
  13. extern unsigned long numa_free_all_bootmem(void);
  14. extern void setup_node_bootmem(int nodeid, unsigned long start,
  15. unsigned long end);
  16. #ifdef CONFIG_NUMA
  17. /*
  18. * Too small node sizes may confuse the VM badly. Usually they
  19. * result from BIOS bugs. So dont recognize nodes as standalone
  20. * NUMA entities that have less than this amount of RAM listed:
  21. */
  22. #define NODE_MIN_SIZE (4*1024*1024)
  23. extern void __init init_cpu_to_node(void);
  24. extern int __cpuinit numa_cpu_node(int cpu);
  25. extern void __cpuinit numa_set_node(int cpu, int node);
  26. extern void __cpuinit numa_clear_node(int cpu);
  27. extern void __cpuinit numa_add_cpu(int cpu);
  28. extern void __cpuinit numa_remove_cpu(int cpu);
  29. #ifdef CONFIG_NUMA_EMU
  30. #define FAKE_NODE_MIN_SIZE ((u64)32 << 20)
  31. #define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL))
  32. void numa_emu_cmdline(char *);
  33. #endif /* CONFIG_NUMA_EMU */
  34. #else
  35. static inline void init_cpu_to_node(void) { }
  36. static inline int numa_cpu_node(int cpu) { return NUMA_NO_NODE; }
  37. static inline void numa_set_node(int cpu, int node) { }
  38. static inline void numa_clear_node(int cpu) { }
  39. static inline void numa_add_cpu(int cpu, int node) { }
  40. static inline void numa_remove_cpu(int cpu) { }
  41. #endif
  42. #endif /* _ASM_X86_NUMA_64_H */