Re: [PATCHv2 2/2] arm64: cpufeature: use static_branch_enable_cpuslocked()

2017-04-28 Thread Will Deacon
On Fri, Apr 28, 2017 at 11:02:30AM +0100, Mark Rutland wrote: > 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

Re: [PATCHv2 2/2] arm64: cpufeature: use static_branch_enable_cpuslocked()

2017-04-28 Thread Will Deacon
On Fri, Apr 28, 2017 at 11:02:30AM +0100, Mark Rutland wrote: > 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

Re: [PATCHv2 2/2] arm64: cpufeature: use static_branch_enable_cpuslocked()

2017-04-28 Thread Mark Rutland
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 > > +++

Re: [PATCHv2 2/2] arm64: cpufeature: use static_branch_enable_cpuslocked()

2017-04-28 Thread Mark Rutland
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 > > +++

Re: [PATCHv2 2/2] arm64: cpufeature: use static_branch_enable_cpuslocked()

2017-04-27 Thread Will Deacon
On Thu, Apr 27, 2017 at 06:44:37PM +0100, Mark Rutland wrote: > Recently, the hotplug locking was conveted to use a percpu rwsem. Unlike > the existing {get,put}_online_cpus() logic, this can't nest. > Unfortunately, in arm64's secondary boot path we can end up nesting via > static_branch_enable()

Re: [PATCHv2 2/2] arm64: cpufeature: use static_branch_enable_cpuslocked()

2017-04-27 Thread Will Deacon
On Thu, Apr 27, 2017 at 06:44:37PM +0100, Mark Rutland wrote: > Recently, the hotplug locking was conveted to use a percpu rwsem. Unlike > the existing {get,put}_online_cpus() logic, this can't nest. > Unfortunately, in arm64's secondary boot path we can end up nesting via > static_branch_enable()

[PATCHv2 2/2] arm64: cpufeature: use static_branch_enable_cpuslocked()

2017-04-27 Thread Mark Rutland
Recently, the hotplug locking was conveted to use a percpu rwsem. Unlike the existing {get,put}_online_cpus() logic, this can't nest. Unfortunately, in arm64's secondary boot path we can end up nesting via static_branch_enable() in cpus_set_cap() when we detect an erratum. This leads to a stream

[PATCHv2 2/2] arm64: cpufeature: use static_branch_enable_cpuslocked()

2017-04-27 Thread Mark Rutland
Recently, the hotplug locking was conveted to use a percpu rwsem. Unlike the existing {get,put}_online_cpus() logic, this can't nest. Unfortunately, in arm64's secondary boot path we can end up nesting via static_branch_enable() in cpus_set_cap() when we detect an erratum. This leads to a stream