mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Rob Herring <robh@kernel.org>, Tony Lindgren <tony@atomide.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	Javier Martinez Canillas <javier.martinez@collabora.co.uk>
Subject: Re: [PATCH 1/3] ARM: cache-l2c: Add flag to skip cache unlocking
Date: Tue, 12 May 2015 07:13:38 +0200	[thread overview]
Message-ID: <1431407618.2411.86.camel@collabora.co.uk> (raw)
In-Reply-To: <20150511222955.GK2067@n2100.arm.linux.org.uk>

On Mon, 2015-05-11 at 23:29 +0100, Russell King - ARM Linux wrote:
> On Tue, May 12, 2015 at 12:17:29AM +0200, Sjoerd Simons wrote:
> >  extern struct outer_cache_fns outer_cache;
> > diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
> > index e309c8f..fff7888 100644
> > --- a/arch/arm/mm/cache-l2x0.c
> > +++ b/arch/arm/mm/cache-l2x0.c
> > @@ -136,7 +136,8 @@ static void l2c_enable(void __iomem *base, u32 aux, unsigned num_lock)
> >  	l2x0_saved_regs.aux_ctrl = aux;
> >  	l2c_configure(base);
> >  
> > -	l2c_unlock(base, num_lock);
> > +	if (!outer_cache.skip_unlock)
> > +		l2c_unlock(base, num_lock);
> 
> I think we can do better here.  If the non-secure lockdown access bit has
> been set, then proceed with the unlock:
> 
> 	if (readl_relaxed(base + L2X0_AUX_CTRL) & L310_AUX_CTRL_NS_LOCKDOWN)
> 		l2c_unlock(base, num_lock);
> 
> I don't see any need to add a flag for this.  This also eliminates your
> second patch.

Main reason I added the flag like this was to simplify the changes as
l2c_enable has no real knowledge about which type of cache it's running
on. 

But sure i will have a look at re-jigging the code such that the
situation is automatically detected rather then requiring the machine
specific code to flag it explicitely 

-- 
Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Collabora Ltd.

  reply	other threads:[~2015-05-12  5:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 22:17 [PATCH 0/3] Fix boot on Calxeda highbank Sjoerd Simons
2015-05-11 22:17 ` [PATCH 1/3] ARM: cache-l2c: Add flag to skip cache unlocking Sjoerd Simons
2015-05-11 22:29   ` Russell King - ARM Linux
2015-05-12  5:13     ` Sjoerd Simons [this message]
2015-05-11 22:17 ` [PATCH 2/3] ARM: l2c: highbank: Skip l2c unlocking Sjoerd Simons
2015-05-11 22:17 ` [PATCH 3/3] ARM: l2c: highbank: Add dummy configure function Sjoerd Simons

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=1431407618.2411.86.camel@collabora.co.uk \
    --to=sjoerd.simons@collabora.co.uk \
    --cc=javier.martinez@collabora.co.uk \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=robh@kernel.org \
    --cc=tony@atomide.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

all inboxes | Powered by JetHome®