setup.c (d8a382d2662822248a97ce9d670b90e68aefbd3a) setup.c (95f72d1ed41a66f1c1c29c24d479de81a0bea36f)
1/*
2 * arch/sh/kernel/setup.c
3 *
4 * This file handles the architecture-dependent parts of initialization
5 *
6 * Copyright (C) 1999 Niibe Yutaka
7 * Copyright (C) 2002 - 2010 Paul Mundt
8 */

--- 16 unchanged lines hidden (view full) ---

25#include <linux/smp.h>
26#include <linux/err.h>
27#include <linux/debugfs.h>
28#include <linux/crash_dump.h>
29#include <linux/mmzone.h>
30#include <linux/clk.h>
31#include <linux/delay.h>
32#include <linux/platform_device.h>
1/*
2 * arch/sh/kernel/setup.c
3 *
4 * This file handles the architecture-dependent parts of initialization
5 *
6 * Copyright (C) 1999 Niibe Yutaka
7 * Copyright (C) 2002 - 2010 Paul Mundt
8 */

--- 16 unchanged lines hidden (view full) ---

25#include <linux/smp.h>
26#include <linux/err.h>
27#include <linux/debugfs.h>
28#include <linux/crash_dump.h>
29#include <linux/mmzone.h>
30#include <linux/clk.h>
31#include <linux/delay.h>
32#include <linux/platform_device.h>
33#include <linux/lmb.h>
33#include <linux/memblock.h>
34#include <asm/uaccess.h>
35#include <asm/io.h>
36#include <asm/page.h>
37#include <asm/elf.h>
38#include <asm/sections.h>
39#include <asm/irq.h>
40#include <asm/setup.h>
41#include <asm/clock.h>

--- 94 unchanged lines hidden (view full) ---

136 goto disable;
137 }
138
139 if (unlikely(start < PAGE_OFFSET)) {
140 pr_err("initrd start < PAGE_OFFSET\n");
141 goto disable;
142 }
143
34#include <asm/uaccess.h>
35#include <asm/io.h>
36#include <asm/page.h>
37#include <asm/elf.h>
38#include <asm/sections.h>
39#include <asm/irq.h>
40#include <asm/setup.h>
41#include <asm/clock.h>

--- 94 unchanged lines hidden (view full) ---

136 goto disable;
137 }
138
139 if (unlikely(start < PAGE_OFFSET)) {
140 pr_err("initrd start < PAGE_OFFSET\n");
141 goto disable;
142 }
143
144 if (unlikely(end > lmb_end_of_DRAM())) {
144 if (unlikely(end > memblock_end_of_DRAM())) {
145 pr_err("initrd extends beyond end of memory "
146 "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
145 pr_err("initrd extends beyond end of memory "
146 "(0x%08lx > 0x%08lx)\ndisabling initrd\n",
147 end, (unsigned long)lmb_end_of_DRAM());
147 end, (unsigned long)memblock_end_of_DRAM());
148 goto disable;
149 }
150
151 /*
152 * If we got this far inspite of the boot loader's best efforts
153 * to the contrary, assume we actually have a valid initrd and
154 * fix up the root dev.
155 */
156 ROOT_DEV = Root_RAM0;
157
158 /*
159 * Address sanitization
160 */
161 initrd_start = (unsigned long)__va(__pa(start));
162 initrd_end = initrd_start + INITRD_SIZE;
163
148 goto disable;
149 }
150
151 /*
152 * If we got this far inspite of the boot loader's best efforts
153 * to the contrary, assume we actually have a valid initrd and
154 * fix up the root dev.
155 */
156 ROOT_DEV = Root_RAM0;
157
158 /*
159 * Address sanitization
160 */
161 initrd_start = (unsigned long)__va(__pa(start));
162 initrd_end = initrd_start + INITRD_SIZE;
163
164 lmb_reserve(__pa(initrd_start), INITRD_SIZE);
164 memblock_reserve(__pa(initrd_start), INITRD_SIZE);
165
166 return;
167
168disable:
169 pr_info("initrd disabled\n");
170 initrd_start = initrd_end = 0;
171#endif
172}

--- 302 unchanged lines hidden ---
165
166 return;
167
168disable:
169 pr_info("initrd disabled\n");
170 initrd_start = initrd_end = 0;
171#endif
172}

--- 302 unchanged lines hidden ---