aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/iseries/setup.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2006-05-17 18:00:46 +1000
committerPaul Mackerras <paulus@samba.org>2006-05-19 15:02:15 +1000
commit2babf5c2ec2f2d5de3e38d20f7df7fd815fd10c9 (patch)
tree9ecda21067fe36f36fbefae87141150b62c39acd /arch/powerpc/platforms/iseries/setup.c
parent[PATCH] powerpc: Parse early parameters earlier (diff)
downloadlinux-dev-2babf5c2ec2f2d5de3e38d20f7df7fd815fd10c9.tar.xz
linux-dev-2babf5c2ec2f2d5de3e38d20f7df7fd815fd10c9.zip
[PATCH] powerpc: Unify mem= handling
We currently do mem= handling in three seperate places. And as benh pointed out I wrote two of them. Now that we parse command line parameters earlier we can clean this mess up. Moving the parsing out of prom_init means the device tree might be allocated above the memory limit. If that happens we'd have to move it. As it happens we already have logic to do that for kdump, so just genericise it. This also means we might have reserved regions above the memory limit, if we do the bootmem allocator will blow up, so we have to modify lmb_enforce_memory_limit() to truncate the reserves as well. Tested on P5 LPAR, iSeries, F50, 44p. Tested moving device tree on P5 and 44p and F50. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to '')
-rw-r--r--arch/powerpc/platforms/iseries/setup.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/arch/powerpc/platforms/iseries/setup.c b/arch/powerpc/platforms/iseries/setup.c
index 074d1d949708..fd6d0ebe8ddd 100644
--- a/arch/powerpc/platforms/iseries/setup.c
+++ b/arch/powerpc/platforms/iseries/setup.c
@@ -90,8 +90,6 @@ extern unsigned long embedded_sysmap_end;
extern unsigned long iSeries_recal_tb;
extern unsigned long iSeries_recal_titan;
-static unsigned long cmd_mem_limit;
-
struct MemoryBlock {
unsigned long absStart;
unsigned long absEnd;
@@ -1026,8 +1024,6 @@ void build_flat_dt(struct iseries_flat_dt *dt, unsigned long phys_mem_size)
/* /chosen */
dt_start_node(dt, "chosen");
dt_prop_str(dt, "bootargs", cmd_line);
- if (cmd_mem_limit)
- dt_prop_u64(dt, "linux,memory-limit", cmd_mem_limit);
dt_end_node(dt);
dt_cpus(dt);
@@ -1053,29 +1049,11 @@ void * __init iSeries_early_setup(void)
iSeries_get_cmdline();
- /* Save unparsed command line copy for /proc/cmdline */
- strlcpy(saved_command_line, cmd_line, COMMAND_LINE_SIZE);
-
- /* Parse early parameters, in particular mem=x */
- parse_early_param();
-
build_flat_dt(&iseries_dt, phys_mem_size);
return (void *) __pa(&iseries_dt);
}
-/*
- * On iSeries we just parse the mem=X option from the command line.
- * On pSeries it's a bit more complicated, see prom_init_mem()
- */
-static int __init early_parsemem(char *p)
-{
- if (p)
- cmd_mem_limit = ALIGN(memparse(p, &p), PAGE_SIZE);
- return 0;
-}
-early_param("mem", early_parsemem);
-
static void hvputc(char c)
{
if (c == '\n')