H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 1 | #ifndef _ASM_X86_NUMA_64_H |
| 2 | #define _ASM_X86_NUMA_64_H |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 3 | |
| 4 | #include <linux/nodemask.h> |
Andrew Morton | afc5465 | 2007-10-17 18:04:32 +0200 | [diff] [blame] | 5 | #include <asm/apicdef.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | |
Andi Kleen | abe059e | 2006-03-25 16:29:12 +0100 | [diff] [blame] | 7 | struct bootnode { |
Joe Perches | cb046ee | 2008-03-23 01:02:55 -0700 | [diff] [blame] | 8 | u64 start; |
| 9 | u64 end; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 10 | }; |
| 11 | |
Suresh Siddha | 6ec6e0d | 2008-03-25 10:14:35 -0700 | [diff] [blame] | 12 | extern int compute_hash_shift(struct bootnode *nodes, int numblks, |
| 13 | int *nodeids); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 14 | |
| 15 | #define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT)) |
| 16 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 17 | extern void numa_init_array(void); |
| 18 | extern int numa_off; |
| 19 | |
travis@sgi.com | 4323838 | 2008-01-30 13:33:25 +0100 | [diff] [blame] | 20 | extern s16 apicid_to_node[MAX_LOCAL_APIC]; |
Thomas Gleixner | aaa64e0 | 2008-01-30 13:30:17 +0100 | [diff] [blame] | 21 | |
Thomas Gleixner | aaa64e0 | 2008-01-30 13:30:17 +0100 | [diff] [blame] | 22 | extern unsigned long numa_free_all_bootmem(void); |
| 23 | extern void setup_node_bootmem(int nodeid, unsigned long start, |
| 24 | unsigned long end); |
| 25 | |
Ravikiran Thirumalai | 05b3cbd | 2006-01-11 22:45:36 +0100 | [diff] [blame] | 26 | #ifdef CONFIG_NUMA |
Yinghai Lu | 7c43769 | 2009-05-15 13:59:37 -0700 | [diff] [blame] | 27 | /* |
| 28 | * Too small node sizes may confuse the VM badly. Usually they |
| 29 | * result from BIOS bugs. So dont recognize nodes as standalone |
| 30 | * NUMA entities that have less than this amount of RAM listed: |
| 31 | */ |
| 32 | #define NODE_MIN_SIZE (4*1024*1024) |
| 33 | |
Ravikiran Thirumalai | 05b3cbd | 2006-01-11 22:45:36 +0100 | [diff] [blame] | 34 | extern void __init init_cpu_to_node(void); |
Mike Travis | 23ca4bb | 2008-05-12 21:21:12 +0200 | [diff] [blame] | 35 | extern void __cpuinit numa_set_node(int cpu, int node); |
| 36 | extern void __cpuinit numa_clear_node(int cpu); |
| 37 | extern void __cpuinit numa_add_cpu(int cpu); |
| 38 | extern void __cpuinit numa_remove_cpu(int cpu); |
David Rientjes | 8df5bb34 | 2010-02-15 13:43:30 -0800 | [diff] [blame] | 39 | |
| 40 | #ifdef CONFIG_NUMA_EMU |
| 41 | #define FAKE_NODE_MIN_SIZE ((u64)64 << 20) |
| 42 | #define FAKE_NODE_MIN_HASH_MASK (~(FAKE_NODE_MIN_SIZE - 1UL)) |
| 43 | #endif /* CONFIG_NUMA_EMU */ |
Ravikiran Thirumalai | 05b3cbd | 2006-01-11 22:45:36 +0100 | [diff] [blame] | 44 | #else |
Mike Travis | 23ca4bb | 2008-05-12 21:21:12 +0200 | [diff] [blame] | 45 | static inline void init_cpu_to_node(void) { } |
| 46 | static inline void numa_set_node(int cpu, int node) { } |
| 47 | static inline void numa_clear_node(int cpu) { } |
| 48 | static inline void numa_add_cpu(int cpu, int node) { } |
| 49 | static inline void numa_remove_cpu(int cpu) { } |
Ravikiran Thirumalai | 05b3cbd | 2006-01-11 22:45:36 +0100 | [diff] [blame] | 50 | #endif |
Andi Kleen | 0b07e98 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 51 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 52 | #endif /* _ASM_X86_NUMA_64_H */ |