linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: santosh.shilimkar@ti.com (Santosh Shilimkar)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] omap4: enable L2 prefetching
Date: Fri, 19 Nov 2010 22:16:59 +0530	[thread overview]
Message-ID: <0b37256331b9279146e923fa58ce7ab8@mail.gmail.com> (raw)
In-Reply-To: <878w0tf6j8.fsf@deeprootsystems.com>

> -----Original Message-----
> From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-
> owner at vger.kernel.org] On Behalf Of Kevin Hilman
> Sent: Wednesday, November 17, 2010 12:19 AM
> To: Nishanth Menon
> Cc: linux-omap; linux-arm; Mans Rullgard
> Subject: Re: [PATCH] omap4: enable L2 prefetching
>
> Nishanth Menon <nm@ti.com> writes:
>
> > From: Mans Rullgard <mans@mansr.com>
> >
> > Enabling L2 prefetching improves performance as shown on Panda
> > ES2.1 board with mem test, and it has measurable impact on
> > performances. I think we should consider it, even though it damages
> > "writes" a bit. (rebased to k.org)
> > Usually the prefetch is used at both levels together L1 + L2, however,
> > to enable the CP15 prefetch engines, these are under security, and on
> > GP devices, we cannot enable it(e.g. on PandaBoard). However, just
> > enabling PL310 prefetch seems to provide performance improvement,
> > as shown in the data below (from Ubuntu) and would be a great thing
> > to pull in.
>
> [...]
>
> >  arch/arm/mach-omap2/omap4-common.c |    6 +++++-
> >  1 files changed, 5 insertions(+), 1 deletions(-)
> >
> > diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-
> omap2/omap4-common.c
> > index 2f89555..a5e6126 100644
> > --- a/arch/arm/mach-omap2/omap4-common.c
> > +++ b/arch/arm/mach-omap2/omap4-common.c
> > @@ -64,6 +64,10 @@ static int __init omap_l2_cache_init(void)
> >  	l2cache_base = ioremap(OMAP44XX_L2CACHE_BASE, SZ_4K);
> >  	BUG_ON(!l2cache_base);
> >
> >
> > +	if (omap_rev() != OMAP4430_REV_ES1_0)
> > +		omap_smc1(0x109, 0x7e470000);
> >
> >  	/* Enable PL310 L2 Cache controller */
> >  	omap_smc1(0x102, 0x1);
> >
> > @@ -75,7 +79,7 @@ static int __init omap_l2_cache_init(void)
> >  	if (omap_rev() == OMAP4430_REV_ES1_0)
> >  		l2x0_init(l2cache_base, 0x0e050000, 0xc0000fff);
> >  	else
> > -		l2x0_init(l2cache_base, 0x0e070000, 0xc0000fff);
> > +		l2x0_init(l2cache_base, 0x7e470000, 0xc0000fff);
> >
> >  	/*
> >  	 * Override default outer_cache.disable with a OMAP4
>
> Adding/updaing the in-code comments would be helpful as well.
>
> The exiting use of all the hard-coded constants in this code is rather
> unreadable and would be much more readable with symbolic constants, and
> this change just continues the pattern.
>
> Ideally, switching this code to use symbolic constants and then adding
> the new feature would be a cleaner approach.
>
I have cleaned up a code a bit based on the comments from Kevin and
also updated change log in Man's patch. Also added couple of
relevant patches as part of this series which I haven't posted yet.

Will post the series on the list soon

Regards,
Santosh

      reply	other threads:[~2010-11-19 16:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-15 16:20 [PATCH] omap4: enable L2 prefetching Nishanth Menon
     [not found] ` <yw1xaala8qex.fsf@unicorn.mansr.com>
2010-11-16 18:11   ` Tony Lindgren
2010-11-16 18:49 ` Kevin Hilman
2010-11-19 16:46   ` Santosh Shilimkar [this message]

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=0b37256331b9279146e923fa58ce7ab8@mail.gmail.com \
    --to=santosh.shilimkar@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).