lkml.org 
[lkml]   [2008]   [Sep]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/1] avr32: added mem kernel command line option support
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) {

\
 
 \ /
  Last update: 2008-09-15 12:31    [W:0.051 / U:10.884 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site