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