lkml.org 
[lkml]   [2015]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/3] ARM: cache-l2c: Add flag to skip cache unlocking
From
Date
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.


\
 
 \ /
  Last update: 2015-05-12 07:21    [W:0.056 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site