From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754757AbYIOOnR (ORCPT ); Mon, 15 Sep 2008 10:43:17 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753499AbYIOOnD (ORCPT ); Mon, 15 Sep 2008 10:43:03 -0400 Received: from rgminet01.oracle.com ([148.87.113.118]:31767 "EHLO rgminet01.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753459AbYIOOnB (ORCPT ); Mon, 15 Sep 2008 10:43:01 -0400 Date: Mon, 15 Sep 2008 07:40:42 -0700 From: Randy Dunlap To: Marco Stornelli Cc: Linux AVR32 , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] avr32: added mem kernel command line option support Message-Id: <20080915074042.f5059467.randy.dunlap@oracle.com> In-Reply-To: <48CE33D7.1040203@coritel.it> References: <48CE33D7.1040203@coritel.it> Organization: Oracle Linux Eng. X-Mailer: Sylpheed 2.5.0 (GTK+ 2.12.0; x86_64-unknown-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAQAAAAI= X-Brightmail-Tracker: AAAAAQAAAAI= X-Whitelist: TRUE X-Whitelist: TRUE Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 15 Sep 2008 12:07:19 +0200 Marco Stornelli wrote: > From: Marco Stornelli > > Added support for the mem kernel command line option > Signed-off-by: Marco Stornelli > --- > --- 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]" [KkMmGg] > + */ > +static int __init early_mem(char **p) > +{ > + unsigned long size, start; > + > + start = system_ram->start; > + size = memparse(*p, p); memparse() returns an unsigned long long. Is the truncation OK for avr32? > + 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) { > -- --- ~Randy Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA http://linuxplumbersconf.org/