diff options
-rw-r--r-- | arch/x86/include/asm/page_32_types.h | 5 | ||||
-rw-r--r-- | arch/x86/kernel/head_32.S | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/include/asm/page_32_types.h b/arch/x86/include/asm/page_32_types.h index f1e4a79a6e41..0f915ae649a7 100644 --- a/arch/x86/include/asm/page_32_types.h +++ b/arch/x86/include/asm/page_32_types.h | |||
@@ -39,6 +39,11 @@ | |||
39 | #define __VIRTUAL_MASK_SHIFT 32 | 39 | #define __VIRTUAL_MASK_SHIFT 32 |
40 | #endif /* CONFIG_X86_PAE */ | 40 | #endif /* CONFIG_X86_PAE */ |
41 | 41 | ||
42 | /* | ||
43 | * Kernel image size is limited to 512 MB (see in arch/x86/kernel/head_32.S) | ||
44 | */ | ||
45 | #define KERNEL_IMAGE_SIZE (512 * 1024 * 1024) | ||
46 | |||
42 | #ifndef __ASSEMBLY__ | 47 | #ifndef __ASSEMBLY__ |
43 | 48 | ||
44 | /* | 49 | /* |
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S index db6652710e98..3ce5456dfbe6 100644 --- a/arch/x86/kernel/head_32.S +++ b/arch/x86/kernel/head_32.S | |||
@@ -54,7 +54,7 @@ | |||
54 | * | 54 | * |
55 | * This should be a multiple of a page. | 55 | * This should be a multiple of a page. |
56 | */ | 56 | */ |
57 | LOW_PAGES = 1<<(32-PAGE_SHIFT_asm) | 57 | LOW_PAGES = (KERNEL_IMAGE_SIZE + PAGE_SIZE_asm - 1)>>PAGE_SHIFT |
58 | 58 | ||
59 | /* | 59 | /* |
60 | * To preserve the DMA pool in PAGEALLOC kernels, we'll allocate | 60 | * To preserve the DMA pool in PAGEALLOC kernels, we'll allocate |