Merge branch 'x86/prototypes' into x86-v28-for-linus-phase1
[linux-2.6-block.git] / include / asm-x86 / sparsemem.h
CommitLineData
77ef50a5
VN
1#ifndef ASM_X86__SPARSEMEM_H
2#define ASM_X86__SPARSEMEM_H
8a423ff0
TG
3
4#ifdef CONFIG_SPARSEMEM
5/*
6 * generic non-linear memory support:
7 *
8 * 1) we will not split memory into more chunks than will fit into the flags
9 * field of the struct page
10 *
11 * SECTION_SIZE_BITS 2^n: size of each section
12 * MAX_PHYSADDR_BITS 2^n: max size of physical address space
13 * MAX_PHYSMEM_BITS 2^n: how much memory we can have in that space
14 *
15 */
16
96a388de 17#ifdef CONFIG_X86_32
8a423ff0 18# ifdef CONFIG_X86_PAE
fb8e8375 19# define SECTION_SIZE_BITS 29
8a423ff0
TG
20# define MAX_PHYSADDR_BITS 36
21# define MAX_PHYSMEM_BITS 36
22# else
23# define SECTION_SIZE_BITS 26
24# define MAX_PHYSADDR_BITS 32
25# define MAX_PHYSMEM_BITS 32
26# endif
27#else /* CONFIG_X86_32 */
28# define SECTION_SIZE_BITS 27 /* matt - 128 is convenient right now */
8434e73d
JS
29# define MAX_PHYSADDR_BITS 44
30# define MAX_PHYSMEM_BITS 44
8a423ff0
TG
31#endif
32
33#endif /* CONFIG_SPARSEMEM */
77ef50a5 34#endif /* ASM_X86__SPARSEMEM_H */