public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Dinh.Nguyen@freescale.com
Cc: linux-kernel@vger.kernel.org, amit.kucheria@canonical.com,
	s.hauer@pengutronix.de, grant.likely@secretlab.ca,
	valentin.longchamp@epfl.ch, daniel@caiaq.de,
	xiao-lizhang@freescale.com, r.schwebel@pengutronix.de,
	linux-arm-kernel@lists.infradead.org, kernel@pengutronix.de
Subject: Re: [PATCH] ARM: imx: Add iram allocator functions
Date: Tue, 5 Oct 2010 09:55:51 +0200	[thread overview]
Message-ID: <20101005075551.GJ11737@pengutronix.de> (raw)
In-Reply-To: <20101005074423.GI11737@pengutronix.de>

On Tue, Oct 05, 2010 at 09:44:23AM +0200, Uwe Kleine-König wrote:
> On Mon, Oct 04, 2010 at 07:03:27PM -0500, Dinh.Nguyen@freescale.com wrote:
> > From: Dinh Nguyen <Dinh.Nguyen@freescale.com>
> > 
> > Add iram allocation functions using GENERIC_ALLOCATOR. The
> > allocation size is 4KB multiples to guarantee alignment. The
> > idea for these functions is for i.MX platforms to use them
> > to dynamically allocate IRAM usage.
> > 
> > Applies on 2.6.36-rc6
> > 
> > Signed-off-by: Dinh Nguyen <Dinh.Nguyen@freescale.com>
> > Reviewed-by: Amit Kucheria <amit.kucheria@canonical.com>
> > ---
> >  arch/arm/plat-mxc/Kconfig                   |   10 ++++
> >  arch/arm/plat-mxc/Makefile                  |    1 +
> >  arch/arm/plat-mxc/include/mach/iram_alloc.h |   35 +++++++++++++++
> >  arch/arm/plat-mxc/iram.c                    |   62 +++++++++++++++++++++++++++
> >  4 files changed, 108 insertions(+), 0 deletions(-)
> >  create mode 100644 arch/arm/plat-mxc/include/mach/iram_alloc.h
> >  create mode 100644 arch/arm/plat-mxc/iram.c
> > 
> > diff --git a/arch/arm/plat-mxc/Kconfig b/arch/arm/plat-mxc/Kconfig
> > index 6785db4..5e4ff93 100644
> > --- a/arch/arm/plat-mxc/Kconfig
> > +++ b/arch/arm/plat-mxc/Kconfig
> > @@ -57,6 +57,16 @@ source "arch/arm/mach-mx5/Kconfig"
> >  
> >  endmenu
> >  
> > +config IRAM_ALLOC
> > +	bool "Enable IRAM allocator"
> > +	default y
> The iram allocator isn't useful taken alone, no?  So I suggest to make
> it 
Hmm.  It seems I forgot to finish this sentence, sorry.

Unless IRAM_ALLOC is an optional feature for new features to come I'd
not make it user selectible, but let the new features select IRAM_ALLOC.
If it's optional I wonder if "default y" should really be done.

Maybe better call the symbol just IRAM?

> > +	iram_pool = gen_pool_create(12, -1);
> 	if (!iram_pool)
> 		...
After rereading the commit log I wondered where the 4 KB are enforced.
Maybe do

	s/12/PAGE_SHIFT/

to make it more obvious?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

  reply	other threads:[~2010-10-05  7:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-05  0:03 [PATCH] ARM: imx: Add iram allocator functions Dinh.Nguyen
2010-10-05  7:44 ` Uwe Kleine-König
2010-10-05  7:55   ` Uwe Kleine-König [this message]
2010-10-05 16:49     ` Nguyen Dinh-R00091
2010-10-05 18:15       ` Uwe Kleine-König
  -- strict thread matches above, loose matches on Subject: below --
2010-10-01 20:51 Dinh.Nguyen
2010-10-04 11:49 ` Amit Kucheria
2010-10-04 11:59   ` Lothar Waßmann
2010-10-04 12:14     ` Amit Kucheria

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101005075551.GJ11737@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=Dinh.Nguyen@freescale.com \
    --cc=amit.kucheria@canonical.com \
    --cc=daniel@caiaq.de \
    --cc=grant.likely@secretlab.ca \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=r.schwebel@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    --cc=valentin.longchamp@epfl.ch \
    --cc=xiao-lizhang@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox