diff options
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/kernel/e820.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86_64/kernel/e820.c b/arch/x86_64/kernel/e820.c index b3f0908668ec..a75c829c2b02 100644 --- a/arch/x86_64/kernel/e820.c +++ b/arch/x86_64/kernel/e820.c | |||
@@ -54,13 +54,13 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size) | |||
54 | 54 | ||
55 | /* various gunk below that needed for SMP startup */ | 55 | /* various gunk below that needed for SMP startup */ |
56 | if (addr < 0x8000) { | 56 | if (addr < 0x8000) { |
57 | *addrp = 0x8000; | 57 | *addrp = PAGE_ALIGN(0x8000); |
58 | return 1; | 58 | return 1; |
59 | } | 59 | } |
60 | 60 | ||
61 | /* direct mapping tables of the kernel */ | 61 | /* direct mapping tables of the kernel */ |
62 | if (last >= table_start<<PAGE_SHIFT && addr < table_end<<PAGE_SHIFT) { | 62 | if (last >= table_start<<PAGE_SHIFT && addr < table_end<<PAGE_SHIFT) { |
63 | *addrp = table_end << PAGE_SHIFT; | 63 | *addrp = PAGE_ALIGN(table_end << PAGE_SHIFT); |
64 | return 1; | 64 | return 1; |
65 | } | 65 | } |
66 | 66 | ||
@@ -68,18 +68,18 @@ static inline int bad_addr(unsigned long *addrp, unsigned long size) | |||
68 | #ifdef CONFIG_BLK_DEV_INITRD | 68 | #ifdef CONFIG_BLK_DEV_INITRD |
69 | if (LOADER_TYPE && INITRD_START && last >= INITRD_START && | 69 | if (LOADER_TYPE && INITRD_START && last >= INITRD_START && |
70 | addr < INITRD_START+INITRD_SIZE) { | 70 | addr < INITRD_START+INITRD_SIZE) { |
71 | *addrp = INITRD_START + INITRD_SIZE; | 71 | *addrp = PAGE_ALIGN(INITRD_START + INITRD_SIZE); |
72 | return 1; | 72 | return 1; |
73 | } | 73 | } |
74 | #endif | 74 | #endif |
75 | /* kernel code */ | 75 | /* kernel code */ |
76 | if (last >= __pa_symbol(&_text) && last < __pa_symbol(&_end)) { | 76 | if (last >= __pa_symbol(&_text) && addr < __pa_symbol(&_end)) { |
77 | *addrp = __pa_symbol(&_end); | 77 | *addrp = PAGE_ALIGN(__pa_symbol(&_end)); |
78 | return 1; | 78 | return 1; |
79 | } | 79 | } |
80 | 80 | ||
81 | if (last >= ebda_addr && addr < ebda_addr + ebda_size) { | 81 | if (last >= ebda_addr && addr < ebda_addr + ebda_size) { |
82 | *addrp = ebda_addr + ebda_size; | 82 | *addrp = PAGE_ALIGN(ebda_addr + ebda_size); |
83 | return 1; | 83 | return 1; |
84 | } | 84 | } |
85 | 85 | ||
@@ -152,7 +152,7 @@ unsigned long __init find_e820_area(unsigned long start, unsigned long end, unsi | |||
152 | continue; | 152 | continue; |
153 | while (bad_addr(&addr, size) && addr+size <= ei->addr+ei->size) | 153 | while (bad_addr(&addr, size) && addr+size <= ei->addr+ei->size) |
154 | ; | 154 | ; |
155 | last = addr + size; | 155 | last = PAGE_ALIGN(addr) + size; |
156 | if (last > ei->addr + ei->size) | 156 | if (last > ei->addr + ei->size) |
157 | continue; | 157 | continue; |
158 | if (last > end) | 158 | if (last > end) |