blob: 22e87c9f6a80551be4ed7108a87a83e4551a15ab [file] [log] [blame]
Joe Perchescb046ee2008-03-23 01:02:55 -07001#ifndef _ASM_X8664_NUMA_H
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#define _ASM_X8664_NUMA_H 1
3
4#include <linux/nodemask.h>
Andrew Mortonafc54652007-10-17 18:04:32 +02005#include <asm/apicdef.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07006
Andi Kleenabe059e2006-03-25 16:29:12 +01007struct bootnode {
Joe Perchescb046ee2008-03-23 01:02:55 -07008 u64 start;
9 u64 end;
Linus Torvalds1da177e2005-04-16 15:20:36 -070010};
11
Suresh Siddha6ec6e0d2008-03-25 10:14:35 -070012extern int compute_hash_shift(struct bootnode *nodes, int numblks,
13 int *nodeids);
Linus Torvalds1da177e2005-04-16 15:20:36 -070014
15#define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT))
16
17extern void numa_add_cpu(int cpu);
18extern void numa_init_array(void);
19extern int numa_off;
20
Andi Kleen69d81fc2005-11-05 17:25:53 +010021extern void numa_set_node(int cpu, int node);
Andi Kleen68a3a7f2006-04-07 19:49:18 +020022extern void srat_reserve_add_area(int nodeid);
23extern int hotadd_percent;
Andi Kleen69d81fc2005-11-05 17:25:53 +010024
travis@sgi.com43238382008-01-30 13:33:25 +010025extern s16 apicid_to_node[MAX_LOCAL_APIC];
Thomas Gleixneraaa64e02008-01-30 13:30:17 +010026
27extern void numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn);
28extern unsigned long numa_free_all_bootmem(void);
29extern void setup_node_bootmem(int nodeid, unsigned long start,
30 unsigned long end);
31
Ravikiran Thirumalai05b3cbd2006-01-11 22:45:36 +010032#ifdef CONFIG_NUMA
33extern void __init init_cpu_to_node(void);
Ravikiran G Thirumalai488fc082006-02-07 12:58:23 -080034
35static inline void clear_node_cpumask(int cpu)
36{
Jeremy Fitzhardinge5548fec2008-01-30 13:30:55 +010037 clear_bit(cpu, (unsigned long *)&node_to_cpumask_map[cpu_to_node(cpu)]);
Ravikiran G Thirumalai488fc082006-02-07 12:58:23 -080038}
39
Ravikiran Thirumalai05b3cbd2006-01-11 22:45:36 +010040#else
41#define init_cpu_to_node() do {} while (0)
Ravikiran G Thirumalai488fc082006-02-07 12:58:23 -080042#define clear_node_cpumask(cpu) do {} while (0)
Ravikiran Thirumalai05b3cbd2006-01-11 22:45:36 +010043#endif
Andi Kleen0b07e982005-09-12 18:49:24 +020044
Linus Torvalds1da177e2005-04-16 15:20:36 -070045#endif