Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef _ASM_X8664_NUMA_H |
| 2 | #define _ASM_X8664_NUMA_H 1 |
| 3 | |
| 4 | #include <linux/nodemask.h> |
| 5 | #include <asm/numnodes.h> |
| 6 | |
Andi Kleen | abe059e | 2006-03-25 16:29:12 +0100 | [diff] [blame] | 7 | struct bootnode { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 8 | u64 start,end; |
| 9 | }; |
| 10 | |
Andi Kleen | abe059e | 2006-03-25 16:29:12 +0100 | [diff] [blame] | 11 | extern int compute_hash_shift(struct bootnode *nodes, int numnodes); |
Andi Kleen | 69e1a33 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 12 | extern int pxm_to_node(int nid); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | |
| 14 | #define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT)) |
| 15 | |
| 16 | extern void numa_add_cpu(int cpu); |
| 17 | extern void numa_init_array(void); |
| 18 | extern int numa_off; |
| 19 | |
Andi Kleen | 69d81fc | 2005-11-05 17:25:53 +0100 | [diff] [blame] | 20 | extern void numa_set_node(int cpu, int node); |
| 21 | |
Andi Kleen | 0b07e98 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 22 | extern unsigned char apicid_to_node[256]; |
Ravikiran Thirumalai | 05b3cbd | 2006-01-11 22:45:36 +0100 | [diff] [blame] | 23 | #ifdef CONFIG_NUMA |
| 24 | extern void __init init_cpu_to_node(void); |
Ravikiran G Thirumalai | 488fc08 | 2006-02-07 12:58:23 -0800 | [diff] [blame] | 25 | |
| 26 | static inline void clear_node_cpumask(int cpu) |
| 27 | { |
| 28 | clear_bit(cpu, &node_to_cpumask[cpu_to_node(cpu)]); |
| 29 | } |
| 30 | |
Ravikiran Thirumalai | 05b3cbd | 2006-01-11 22:45:36 +0100 | [diff] [blame] | 31 | #else |
| 32 | #define init_cpu_to_node() do {} while (0) |
Ravikiran G Thirumalai | 488fc08 | 2006-02-07 12:58:23 -0800 | [diff] [blame] | 33 | #define clear_node_cpumask(cpu) do {} while (0) |
Ravikiran Thirumalai | 05b3cbd | 2006-01-11 22:45:36 +0100 | [diff] [blame] | 34 | #endif |
Andi Kleen | 0b07e98 | 2005-09-12 18:49:24 +0200 | [diff] [blame] | 35 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | #define NUMA_NO_NODE 0xff |
| 37 | |
| 38 | #endif |