public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] avr32: added mem kernel command line option support
@ 2008-09-15 10:07 Marco Stornelli
  2008-09-15 14:40 ` Randy Dunlap
  0 siblings, 1 reply; 8+ messages in thread
From: Marco Stornelli @ 2008-09-15 10:07 UTC (permalink / raw)
  To: Linux AVR32; +Cc: linux-kernel

From: Marco Stornelli <marco.stornelli@gmail.com>

Added support for the mem kernel command line option
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
---
--- setup.c.orig    2008-09-15 11:30:00.000000000 +0200
+++ setup.c    2008-09-15 11:30:17.000000000 +0200
@@ -283,6 +283,25 @@ static int __init early_parse_fbmem(char
 }
 early_param("fbmem", early_parse_fbmem);
 
+/*
+ * Pick out the memory size.  We look for mem=size@start,
+ * where start and size are "size[KkMm]"
+ */
+static int __init early_mem(char **p)
+{
+    unsigned long size, start;
+
+    start = system_ram->start;
+    size  = memparse(*p, p);
+    if (**p == '@')
+        start = memparse(*p + 1, p);
+
+    system_ram->start = start;
+    system_ram->end = system_ram->start + size - 1;
+    return 0;
+}
+early_param("mem", early_mem);
+
 static int __init parse_tag_core(struct tag *tag)
 {
     if (tag->hdr.size > 2) {

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2008-09-16  8:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-15 10:07 [PATCH 1/1] avr32: added mem kernel command line option support Marco Stornelli
2008-09-15 14:40 ` Randy Dunlap
2008-09-15 14:57   ` Marco Stornelli
2008-09-15 15:05     ` Randy Dunlap
2008-09-15 15:30       ` Marco Stornelli
2008-09-15 15:36         ` Randy Dunlap
2008-09-16  7:14           ` Marco Stornelli
2008-09-16  8:06             ` Haavard Skinnemoen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox