diff options
author | David Gibson <david@gibson.dropbear.id.au> | 2007-02-28 14:12:29 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-03-08 15:43:35 +1100 |
commit | 30437b3e743f33e9b68f813ca24e547aa9fcf7d7 (patch) | |
tree | 6ff8799e8fbfd717f288e7365a5329a01505e9be /arch/powerpc/kernel/setup-common.c | |
parent | eb6de2863750e696201780283e4c9ada19b4728e (diff) | |
download | linux-30437b3e743f33e9b68f813ca24e547aa9fcf7d7.tar.gz linux-30437b3e743f33e9b68f813ca24e547aa9fcf7d7.tar.bz2 linux-30437b3e743f33e9b68f813ca24e547aa9fcf7d7.zip |
[POWERPC] Automatically lmb_reserve() initrd
At present, when an initrd is passed to the kernel used flat device
tree properties, the memory the initrd occupies must also be reserved
in the flat tree's reserve map, or the kernel may overwrite it. That
makes life more complicated than it could be for the bootwrapper.
This patch makes the kernel automatically reserve the initrd's space.
That in turn requires parsing the initrd parameters earlier than they
are currently, in early_init_dt_scan_chosen() instead of
check_for_initrd().
Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/setup-common.c')
-rw-r--r-- | arch/powerpc/kernel/setup-common.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 89cfaf49d3de..d050d9a61bd4 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -304,26 +304,8 @@ struct seq_operations cpuinfo_op = { void __init check_for_initrd(void) { #ifdef CONFIG_BLK_DEV_INITRD - const unsigned int *prop; - int len; - - DBG(" -> check_for_initrd()\n"); - - if (of_chosen) { - prop = get_property(of_chosen, "linux,initrd-start", &len); - if (prop != NULL) { - initrd_start = (unsigned long) - __va(of_read_ulong(prop, len / 4)); - prop = get_property(of_chosen, - "linux,initrd-end", &len); - if (prop != NULL) { - initrd_end = (unsigned long) - __va(of_read_ulong(prop, len / 4)); - initrd_below_start_ok = 1; - } else - initrd_start = 0; - } - } + DBG(" -> check_for_initrd() initrd_start=0x%lx initrd_end=0x%lx\n", + initrd_start, initrd_end); /* If we were passed an initrd, set the ROOT_DEV properly if the values * look sensible. If not, clear initrd reference. |