From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1163644AbdD0RDz (ORCPT ); Thu, 27 Apr 2017 13:03:55 -0400 Received: from foss.arm.com ([217.140.101.70]:39840 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1034379AbdD0RDl (ORCPT ); Thu, 27 Apr 2017 13:03:41 -0400 Subject: Re: [PATCH] arm64: cpufeature: use static_branch_enable_cpuslocked() To: Mark Rutland References: <20170425161037.GA27156@leverpostej> <20170425172838.mr3kyccsdteyjso5@linutronix.de> <20170426085958.GC27156@leverpostej> <20170426103236.GI27156@leverpostej> <20170427082719.3wyru4bk67kdmflb@linutronix.de> <20170427095744.GB31337@leverpostej> <20170427123056.GD31337@leverpostej> <20170427154806.GA6646@leverpostej> <20170427163546.GA30972@e107814-lin.cambridge.arm.com> Cc: Thomas Gleixner , catalin.marinas@arm.com, will.deacon@arm.com, Peter Zijlstra , Sebastian Siewior , LKML , Steven Rostedt , Ingo Molnar , linux-arm-kernel@lists.infradead.org From: Suzuki K Poulose Message-ID: <2e321402-7042-9d5b-aa85-52b0e6f1e20c@arm.com> Date: Thu, 27 Apr 2017 18:03:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170427163546.GA30972@e107814-lin.cambridge.arm.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27/04/17 17:35, Suzuki K Poulose wrote: > rom f3b0809224e4915197d3ae4a38ebe7f210e74abf Mon Sep 17 00:00:00 2001 > From: Mark Rutland > Date: Thu, 27 Apr 2017 16:48:06 +0100 > Subject: [PATCH] arm64: cpufeature: use static_branch_enable_cpuslocked() > Build break alert. There are some issues with patch below. > > Signed-off-by: Mark Rutland > Reported-by: Catalin Marinas > Suggested-by: Sebastian Andrzej Siewior > Suggested-by: Thomas Gleixner > Cc: Will Deacon > Cc: Suzuki Poulose > Signed-off-by: Mark Rutland > Signed-off-by: Suzuki K Poulose > --- > arch/arm64/include/asm/cpufeature.h | 5 +++-- > arch/arm64/kernel/cpu_errata.c | 13 ++++++++++++- > arch/arm64/kernel/cpufeature.c | 5 ++++- > arch/arm64/kernel/smp.c | 7 +++---- > 4 files changed, 22 insertions(+), 8 deletions(-) > > void __init enable_errata_workarounds(void) > diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c > index 94b8f7f..62bdab4 100644 > --- a/arch/arm64/kernel/cpufeature.c > +++ b/arch/arm64/kernel/cpufeature.c > @@ -966,6 +966,7 @@ static void __init setup_elf_hwcaps(const struct arm64_cpu_capabilities *hwcaps) > cap_set_elf_hwcap(hwcaps); > } > > +/* Should be called with CPU hotplug lock held */ > void update_cpu_capabilities(const struct arm64_cpu_capabilities *caps, > const char *info) > { > @@ -1092,7 +1093,9 @@ void check_local_cpu_capabilities(void) > > static void __init setup_feature_capabilities(void) > { > - update_cpu_capabilities(arm64_features, "detected feature:"); > + get_online_cpus(); > + update_cpu_capabilities(arm6_features, "detected feature:"); s/arm6_features/arm64_features And we need the following hunk: diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c index 62bdab4..19c359a 100644 --- a/arch/arm64/kernel/cpufeature.c +++ b/arch/arm64/kernel/cpufeature.c @@ -1086,7 +1086,7 @@ void check_local_cpu_capabilities(void) * advertised capabilities. */ if (!sys_caps_initialised) - update_cpu_errata_workarounds(); + update_secondary_cpu_errata_workarounds(); else verify_local_cpu_capabilities(); } Sorry about that. Suzuki