Merge tag 'pm-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
[linux/fpc-iii.git] / arch / x86 / include / asm / sparsemem.h
blob1f5bee2c202fa559177ae964b5cb5ba5d22fad01
1 #ifndef _ASM_X86_SPARSEMEM_H
2 #define _ASM_X86_SPARSEMEM_H
4 #ifdef CONFIG_SPARSEMEM
5 /*
6 * generic non-linear memory support:
8 * 1) we will not split memory into more chunks than will fit into the flags
9 * field of the struct page
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
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 # ifdef CONFIG_X86_5LEVEL
30 # define MAX_PHYSADDR_BITS 52
31 # define MAX_PHYSMEM_BITS 52
32 # else
33 # define MAX_PHYSADDR_BITS 44
34 # define MAX_PHYSMEM_BITS 46
35 # endif
36 #endif
38 #endif /* CONFIG_SPARSEMEM */
39 #endif /* _ASM_X86_SPARSEMEM_H */