blob: c797cd523d2bd754b5b0e131c34fc859269530dd [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _ASM_X8664_NUMA_H
2#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 {
Linus Torvalds1da177e2005-04-16 15:20:36 -07008 u64 start,end;
9};
10
Andi Kleenabe059e2006-03-25 16:29:12 +010011extern int compute_hash_shift(struct bootnode *nodes, int numnodes);
Linus Torvalds1da177e2005-04-16 15:20:36 -070012
13#define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT))
14
15extern void numa_add_cpu(int cpu);
16extern void numa_init_array(void);
17extern int numa_off;
18
Andi Kleen69d81fc2005-11-05 17:25:53 +010019extern void numa_set_node(int cpu, int node);
Andi Kleen68a3a7f2006-04-07 19:49:18 +020020extern void srat_reserve_add_area(int nodeid);
21extern int hotadd_percent;
Andi Kleen69d81fc2005-11-05 17:25:53 +010022
travis@sgi.com3cc87e32008-01-30 13:33:11 +010023extern u16 apicid_to_node[MAX_LOCAL_APIC];
Thomas Gleixneraaa64e02008-01-30 13:30:17 +010024
25extern void numa_initmem_init(unsigned long start_pfn, unsigned long end_pfn);
26extern unsigned long numa_free_all_bootmem(void);
27extern void setup_node_bootmem(int nodeid, unsigned long start,
28 unsigned long end);
29
Ravikiran Thirumalai05b3cbd2006-01-11 22:45:36 +010030#ifdef CONFIG_NUMA
31extern void __init init_cpu_to_node(void);
Ravikiran G Thirumalai488fc082006-02-07 12:58:23 -080032
33static inline void clear_node_cpumask(int cpu)
34{
Jeremy Fitzhardinge5548fec2008-01-30 13:30:55 +010035 clear_bit(cpu, (unsigned long *)&node_to_cpumask_map[cpu_to_node(cpu)]);
Ravikiran G Thirumalai488fc082006-02-07 12:58:23 -080036}
37
Ravikiran Thirumalai05b3cbd2006-01-11 22:45:36 +010038#else
39#define init_cpu_to_node() do {} while (0)
Ravikiran G Thirumalai488fc082006-02-07 12:58:23 -080040#define clear_node_cpumask(cpu) do {} while (0)
Ravikiran Thirumalai05b3cbd2006-01-11 22:45:36 +010041#endif
Andi Kleen0b07e982005-09-12 18:49:24 +020042
Linus Torvalds1da177e2005-04-16 15:20:36 -070043#endif