[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170428100230.GA22621@leverpostej>
Date: Fri, 28 Apr 2017 11:02:30 +0100
From: Mark Rutland <mark.rutland@....com>
To: Will Deacon <will.deacon@....com>
Cc: catalin.marinas@....com, tglx@...utronix.de,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
bigeasy@...utronix.de, jbaron@...mai.com, peterz@...radead.org,
rostedt@...dmis.org, suzuki.poulose@....com
Subject: Re: [PATCHv2 2/2] arm64: cpufeature: use
static_branch_enable_cpuslocked()
On Thu, Apr 27, 2017 at 07:01:04PM +0100, Will Deacon wrote:
> On Thu, Apr 27, 2017 at 06:44:37PM +0100, Mark Rutland wrote:
> > diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c
> > index f6cc67e..379ad8d 100644
> > --- a/arch/arm64/kernel/cpu_errata.c
> > +++ b/arch/arm64/kernel/cpu_errata.c
> > @@ -175,9 +175,20 @@ void verify_local_cpu_errata_workarounds(void)
> > }
> > }
> >
> > -void update_cpu_errata_workarounds(void)
> > +/*
> > + * Secondary CPUs are booted with the waker holding the
> > + * CPU hotplug lock, hence we don't need to lock it here again.
> > + */
> > +void update_secondary_cpu_errata_workarounds(void)
> > +{
> > + update_cpu_capabilities(arm64_errata, "enabling workaround for");
> > +}
> > +
> > +void update_boot_cpu_errata_workarounds(void)
> > {
> > + get_online_cpus();
> > update_cpu_capabilities(arm64_errata, "enabling workaround for");
> > + put_online_cpus();
> > }
>
> These functions seem to have unhelpful names, especially when compared to
> the naming scheme used by the core code. I'd prefer to have:
>
> update_cpu_errata_workarounds: just calls update_cpu_capabilities
>
> update_cpu_errata_workarounds_cpuslocked: does get_online_cpus(), then calls
> update_cpu_errata_workarounds, then does put_online_cpus();
That's the opposite polarity to the other _cpuslocked functions, where
_cpuslocked means that the lock is already held (and should not be taken
by the _cpuslocked function itself.
So I'll make those changes, but I'll swap that so:
update_cpu_errata_workarounds() does:
get_online_cpus()
update_cpu_errata_workarounds_cpuslocked()
put_online_cpus()
> With that change:
>
> Acked-by: Will Deacon <will.deacon@....com>
I assume that will stand with the above change. Please shout if not!
Thanks,
Mark.
Powered by blists - more mailing lists