summaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-03-28 08:02:14 +0200
committerPaul Mackerras <paulus@samba.org>2006-03-28 08:02:14 +0200
commitfacee873de8da5fe709c194f98eb0f2cc642a38c (patch)
tree03a27e962c2a7ce56b5f56b5b4c8cda9d6b14a7d /arch/powerpc
parent[PATCH] powerpc: make ISA floppies work again (diff)
parentpowerpc: use memparse() for mem= command line parsing (diff)
downloadlinux-facee873de8da5fe709c194f98eb0f2cc642a38c.tar.xz
linux-facee873de8da5fe709c194f98eb0f2cc642a38c.zip
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/galak/powerpc
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/prom.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 5a24415a2e3c..95d15eb5c03f 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1030,25 +1030,13 @@ static int __init early_init_dt_scan_chosen(unsigned long node,
if (strstr(cmd_line, "mem=")) {
char *p, *q;
- unsigned long maxmem = 0;
for (q = cmd_line; (p = strstr(q, "mem=")) != 0; ) {
q = p + 4;
if (p > cmd_line && p[-1] != ' ')
continue;
- maxmem = simple_strtoul(q, &q, 0);
- if (*q == 'k' || *q == 'K') {
- maxmem <<= 10;
- ++q;
- } else if (*q == 'm' || *q == 'M') {
- maxmem <<= 20;
- ++q;
- } else if (*q == 'g' || *q == 'G') {
- maxmem <<= 30;
- ++q;
- }
+ memory_limit = memparse(q, &q);
}
- memory_limit = maxmem;
}
/* break now */