Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 12277
b: refs/heads/master
c: bec7c45
h: refs/heads/master
i:
  12275: 9580c25
v: v3
  • Loading branch information
Stephen Rothwell committed Nov 1, 2005
1 parent 7c0c39e commit e6da65c
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 35 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5015b49448cbe5352b9cc232333ab26f3e608a07
refs/heads/master: bec7c458b372251617e0fdc6bf8ce4df06bab430
17 changes: 0 additions & 17 deletions trunk/arch/powerpc/kernel/setup_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,23 +631,6 @@ static int ppc64_panic_event(struct notifier_block *this,
return NOTIFY_DONE;
}

#ifdef CONFIG_PPC_ISERIES
/*
* 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)
return 0;

memory_limit = ALIGN(memparse(p, &p), PAGE_SIZE);

return 0;
}
early_param("mem", early_parsemem);
#endif /* CONFIG_PPC_ISERIES */

#ifdef CONFIG_IRQSTACKS
static void __init irqstack_early_init(void)
{
Expand Down
42 changes: 25 additions & 17 deletions trunk/arch/powerpc/platforms/iseries/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/kdev_t.h>
#include <linux/major.h>
#include <linux/root_dev.h>
#include <linux/kernel.h>

#include <asm/processor.h>
#include <asm/machdep.h>
Expand Down Expand Up @@ -94,6 +95,8 @@ extern unsigned long iSeries_recal_titan;

static int mf_initialized;

static unsigned long cmd_mem_limit;

struct MemoryBlock {
unsigned long absStart;
unsigned long absEnd;
Expand Down Expand Up @@ -341,23 +344,6 @@ static void __init iSeries_init_early(void)
*/
iommu_init_early_iSeries();

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();

if (memory_limit) {
if (memory_limit < systemcfg->physicalMemorySize)
systemcfg->physicalMemorySize = memory_limit;
else {
printk("Ignoring mem=%lu >= ram_top.\n", memory_limit);
memory_limit = 0;
}
}

/* Initialize machine-dependency vectors */
#ifdef CONFIG_SMP
smp_init_iSeries();
Expand Down Expand Up @@ -971,6 +957,8 @@ void build_flat_dt(struct iseries_flat_dt *dt)
/* /chosen */
dt_start_node(dt, "chosen");
dt_prop_u32(dt, "linux,platform", PLATFORM_ISERIES_LPAR);
if (cmd_mem_limit)
dt_prop_u64(dt, "linux,memory-limit", cmd_mem_limit);
dt_end_node(dt);

dt_cpus(dt);
Expand All @@ -990,7 +978,27 @@ void * __init iSeries_early_setup(void)
*/
build_iSeries_Memory_Map();

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);

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);

0 comments on commit e6da65c

Please sign in to comment.