]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blob - src/patches/suse-2.6.27.25/patches.fixes/sparsemem-maxmem-fix
Updated xen patches taken from suse.
[people/teissler/ipfire-2.x.git] / src / patches / suse-2.6.27.25 / patches.fixes / sparsemem-maxmem-fix
1 From: Ingo Molnar <mingo@elte.hu>
2 Subject: Limit MAXMEM on 64bit
3 Patch-Mainline: Yes
4
5 on 64-bit x86 the physical memory limit is controlled by the sparsemem
6 bits - which are 44 bits right now. But MAXMEM (the max pfn number
7 e820 parsing will allow to enter our sizing routines) is set to
8 0x00003fffffffffff, i.e. 46 bits - that's too large because it overlaps
9 into the vmalloc range.
10
11 So couple MAXMEM to MAX_PHYSMEM_BITS, and add a comment that the
12 maximum of MAX_PHYSMEM_BITS is 45 bits.
13
14 Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 Signed-off-by: Hannes Reinecke <hare@suse.de>
16
17 Index: linux-2.6.27-SLE11_BRANCH/include/asm-x86/pgtable_64.h
18 ===================================================================
19 --- linux-2.6.27-SLE11_BRANCH.orig/include/asm-x86/pgtable_64.h
20 +++ linux-2.6.27-SLE11_BRANCH/include/asm-x86/pgtable_64.h
21 @@ -146,7 +146,7 @@ static inline void native_pgd_clear(pgd_
22 #define PGDIR_MASK (~(PGDIR_SIZE - 1))
23
24
25 -#define MAXMEM _AC(0x00003fffffffffff, UL)
26 +#define MAXMEM _AC(__AC(1, UL) << MAX_PHYSMEM_BITS, UL)
27 #define VMALLOC_START _AC(0xffffc20000000000, UL)
28 #define VMALLOC_END _AC(0xffffe1ffffffffff, UL)
29 #define VMEMMAP_START _AC(0xffffe20000000000, UL)
30 Index: linux-2.6.27-SLE11_BRANCH/include/asm-x86/sparsemem.h
31 ===================================================================
32 --- linux-2.6.27-SLE11_BRANCH.orig/include/asm-x86/sparsemem.h
33 +++ linux-2.6.27-SLE11_BRANCH/include/asm-x86/sparsemem.h
34 @@ -27,7 +27,7 @@
35 #else /* CONFIG_X86_32 */
36 # define SECTION_SIZE_BITS 27 /* matt - 128 is convenient right now */
37 # define MAX_PHYSADDR_BITS 44
38 -# define MAX_PHYSMEM_BITS 44
39 +# define MAX_PHYSMEM_BITS 44 /* Can be max 45 bits */
40 #endif
41
42 #endif /* CONFIG_SPARSEMEM */