diff options
author | Stuart Menefy <stuart.menefy@st.com> | 2008-09-05 03:14:17 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2008-09-07 21:35:04 -0400 |
commit | 28d6e52cf7e881834d2dab370afa20b6223f726c (patch) | |
tree | 26215385a326b53c864442735480d65b4e699aa5 /arch/sh | |
parent | c6feb6142cb85228e73497a309f475a0d7279318 (diff) |
sh: Fix up broken 32-bit initrd support.
Signed-off-by: Stuart Menefy <stuart.menefy@st.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/kernel/setup.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 6d0899e890d0..fc7171a9c804 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -249,17 +249,18 @@ void __init setup_bootmem_allocator(unsigned long free_pfn) | |||
249 | ROOT_DEV = Root_RAM0; | 249 | ROOT_DEV = Root_RAM0; |
250 | 250 | ||
251 | if (LOADER_TYPE && INITRD_START) { | 251 | if (LOADER_TYPE && INITRD_START) { |
252 | if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { | 252 | unsigned long initrd_start_phys = INITRD_START + __MEMORY_START; |
253 | reserve_bootmem(INITRD_START + __MEMORY_START, | 253 | |
254 | INITRD_SIZE, BOOTMEM_DEFAULT); | 254 | if (initrd_start_phys + INITRD_SIZE <= PFN_PHYS(max_low_pfn)) { |
255 | initrd_start = INITRD_START + PAGE_OFFSET + | 255 | reserve_bootmem(initrd_start_phys, INITRD_SIZE, |
256 | __MEMORY_START; | 256 | BOOTMEM_DEFAULT); |
257 | initrd_start = (unsigned long)__va(initrd_start_phys); | ||
257 | initrd_end = initrd_start + INITRD_SIZE; | 258 | initrd_end = initrd_start + INITRD_SIZE; |
258 | } else { | 259 | } else { |
259 | printk("initrd extends beyond end of memory " | 260 | printk("initrd extends beyond end of memory " |
260 | "(0x%08lx > 0x%08lx)\ndisabling initrd\n", | 261 | "(0x%08lx > 0x%08lx)\ndisabling initrd\n", |
261 | INITRD_START + INITRD_SIZE, | 262 | initrd_start_phys + INITRD_SIZE, |
262 | max_low_pfn << PAGE_SHIFT); | 263 | PFN_PHYS(max_low_pfn)); |
263 | initrd_start = 0; | 264 | initrd_start = 0; |
264 | } | 265 | } |
265 | } | 266 | } |