numa_64.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. #else
  31. static inline void init_cpu_to_node(void) { }
  32. static inline void numa_set_node(int cpu, int node) { }
  33. static inline void numa_clear_node(int cpu) { }
  34. static inline void numa_add_cpu(int cpu, int node) { }
  35. static inline void numa_remove_cpu(int cpu) { }
  36. #endif
  37. #endif /* _ASM_X86_NUMA_64_H */