numa_64.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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_add_cpu(int cpu);
  26. extern void __cpuinit numa_remove_cpu(int cpu);
  27. #ifdef CONFIG_NUMA_EMU
  28. #define FAKE_NODE_MIN_SIZE ((u64)32 << 20)
  29. #define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL))
  30. void numa_emu_cmdline(char *);
  31. #endif /* CONFIG_NUMA_EMU */
  32. #else
  33. static inline void init_cpu_to_node(void) { }
  34. static inline int numa_cpu_node(int cpu) { return NUMA_NO_NODE; }
  35. static inline void numa_add_cpu(int cpu, int node) { }
  36. static inline void numa_remove_cpu(int cpu) { }
  37. #endif
  38. #endif /* _ASM_X86_NUMA_64_H */