diff options
| author | Tony Lindgren <tony@atomide.com> | 2011-11-07 12:27:23 -0800 | 
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2011-11-07 12:27:23 -0800 | 
| commit | d30cc16c8e48368e0518f4975a78711e53e14a0f (patch) | |
| tree | 26b57f7ab5a963cc3d6c57dff6951bd930875583 /arch/powerpc/kernel/prom.c | |
| parent | 41eb2d813f558900884e240c2f723e36c7bd151f (diff) | |
| parent | a1bcc1dcef8451b4291ea2a1b2677cb194102952 (diff) | |
| download | olio-linux-3.10-d30cc16c8e48368e0518f4975a78711e53e14a0f.tar.xz olio-linux-3.10-d30cc16c8e48368e0518f4975a78711e53e14a0f.zip  | |
Merge branch 'fixes-modulesplit' into fixes
Diffstat (limited to 'arch/powerpc/kernel/prom.c')
| -rw-r--r-- | arch/powerpc/kernel/prom.c | 21 | 
1 files changed, 19 insertions, 2 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 174e1e96175..fa1235b0503 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c @@ -27,7 +27,7 @@  #include <linux/delay.h>  #include <linux/initrd.h>  #include <linux/bitops.h> -#include <linux/module.h> +#include <linux/export.h>  #include <linux/kexec.h>  #include <linux/debugfs.h>  #include <linux/irq.h> @@ -54,6 +54,8 @@  #include <asm/pci-bridge.h>  #include <asm/phyp_dump.h>  #include <asm/kexec.h> +#include <asm/opal.h> +  #include <mm/mmu_decl.h>  #ifdef DEBUG @@ -707,11 +709,23 @@ void __init early_init_devtree(void *params)  	of_scan_flat_dt(early_init_dt_scan_rtas, NULL);  #endif +#ifdef CONFIG_PPC_POWERNV +	/* Some machines might need OPAL info for debugging, grab it now. */ +	of_scan_flat_dt(early_init_dt_scan_opal, NULL); +#endif +  #ifdef CONFIG_PHYP_DUMP  	/* scan tree to see if dump occurred during last boot */  	of_scan_flat_dt(early_init_dt_scan_phyp_dump, NULL);  #endif +	/* Pre-initialize the cmd_line with the content of boot_commmand_line, +	 * which will be empty except when the content of the variable has +	 * been overriden by a bootloading mechanism. This happens typically +	 * with HAL takeover +	 */ +	strlcpy(cmd_line, boot_command_line, COMMAND_LINE_SIZE); +  	/* Retrieve various informations from the /chosen node of the  	 * device-tree, including the platform type, initrd location and  	 * size, TCE reserve, and more ... @@ -723,12 +737,15 @@ void __init early_init_devtree(void *params)  	of_scan_flat_dt(early_init_dt_scan_root, NULL);  	of_scan_flat_dt(early_init_dt_scan_memory_ppc, NULL); -	setup_initial_memory_limit(memstart_addr, first_memblock_size);  	/* Save command line for /proc/cmdline and then parse parameters */  	strlcpy(boot_command_line, cmd_line, COMMAND_LINE_SIZE);  	parse_early_param(); +	/* make sure we've parsed cmdline for mem= before this */ +	if (memory_limit) +		first_memblock_size = min(first_memblock_size, memory_limit); +	setup_initial_memory_limit(memstart_addr, first_memblock_size);  	/* Reserve MEMBLOCK regions used by kernel, initrd, dt, etc... */  	memblock_reserve(PHYSICAL_START, __pa(klimit) - PHYSICAL_START);  	/* If relocatable, reserve first 32k for interrupt vectors etc. */  |