diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-08-17 21:05:42 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-10-23 01:55:20 -0400 |
commit | bb8985586b7a906e116db835c64773b7a7d51663 (patch) | |
tree | de93ae58e88cc563d95cc124a73f3930594c6100 /arch/x86/include/asm/sparsemem.h | |
parent | 8ede0bdb63305d3353efd97e9af6210afb05734e (diff) |
x86, um: ... and asm-x86 move
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/include/asm/sparsemem.h')
-rw-r--r-- | arch/x86/include/asm/sparsemem.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/arch/x86/include/asm/sparsemem.h b/arch/x86/include/asm/sparsemem.h new file mode 100644 index 000000000000..38f8e6bc3186 --- /dev/null +++ b/arch/x86/include/asm/sparsemem.h | |||
@@ -0,0 +1,34 @@ | |||
1 | #ifndef ASM_X86__SPARSEMEM_H | ||
2 | #define ASM_X86__SPARSEMEM_H | ||
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 | |||
17 | #ifdef CONFIG_X86_32 | ||
18 | # ifdef CONFIG_X86_PAE | ||
19 | # define SECTION_SIZE_BITS 29 | ||
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 */ | ||
29 | # define MAX_PHYSADDR_BITS 44 | ||
30 | # define MAX_PHYSMEM_BITS 44 | ||
31 | #endif | ||
32 | |||
33 | #endif /* CONFIG_SPARSEMEM */ | ||
34 | #endif /* ASM_X86__SPARSEMEM_H */ | ||