numa_64.h 1.1 KB
Newer Older
H
H. Peter Anvin 已提交
1 2
#ifndef _ASM_X86_NUMA_64_H
#define _ASM_X86_NUMA_64_H
L
Linus Torvalds 已提交
3 4 5

#include <linux/nodemask.h>

6
struct bootnode {
7 8
	u64 start;
	u64 end;
L
Linus Torvalds 已提交
9 10
};

11 12
extern int compute_hash_shift(struct bootnode *nodes, int numblks,
			      int *nodeids);
L
Linus Torvalds 已提交
13 14 15 16 17 18

#define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT))

extern void numa_init_array(void);
extern int numa_off;

19 20 21 22
extern unsigned long numa_free_all_bootmem(void);
extern void setup_node_bootmem(int nodeid, unsigned long start,
			       unsigned long end);

23
#ifdef CONFIG_NUMA
24 25 26 27 28 29 30
/*
 * Too small node sizes may confuse the VM badly. Usually they
 * result from BIOS bugs. So dont recognize nodes as standalone
 * NUMA entities that have less than this amount of RAM listed:
 */
#define NODE_MIN_SIZE (4*1024*1024)

31
extern void __init init_cpu_to_node(void);
32
extern int __cpuinit numa_cpu_node(int cpu);
33 34

#ifdef CONFIG_NUMA_EMU
35
#define FAKE_NODE_MIN_SIZE	((u64)32 << 20)
36
#define FAKE_NODE_MIN_HASH_MASK	(~(FAKE_NODE_MIN_SIZE - 1UL))
37
void numa_emu_cmdline(char *);
38
#endif /* CONFIG_NUMA_EMU */
39
#else
40
static inline void init_cpu_to_node(void)		{ }
41
static inline int numa_cpu_node(int cpu)		{ return NUMA_NO_NODE; }
42
#endif
43

H
H. Peter Anvin 已提交
44
#endif /* _ASM_X86_NUMA_64_H */