All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
To: Marc Zyngier <maz@kernel.org>
Cc: Will Deacon <will@kernel.org>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Doug Anderson <dianders@google.com>,
	Matthias Kaehlcke <mka@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	Stephen Boyd <swboyd@chromium.org>,
	kernel-team@android.com,
	Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 0/2] arm64: Allow erratum 1418040 for late CPUs
Date: Fri, 11 Sep 2020 16:34:26 +0000	[thread overview]
Message-ID: <010101747e049e19-cd34cdd9-28ef-439f-9cf6-98fc94b4639d-000000@us-west-2.amazonses.com> (raw)
In-Reply-To: <2ac4ab0817cd4ba26c17b93257ec6dbf@kernel.org>

On 2020-09-11 19:00, Marc Zyngier wrote:
> On 2020-09-10 14:43, Sai Prakash Ranjan wrote:
>> On 2020-09-09 20:23, Doug Anderson wrote:
>>> Hi,
>>> 
>>> On Fri, Aug 21, 2020 at 11:15 AM Catalin Marinas
>>> <catalin.marinas@arm.com> wrote:
>>>> 
>>>> On Fri, 31 Jul 2020 18:38:22 +0100, Marc Zyngier wrote:
>>>> > Erratum 1418040 currently prevents a late CPU from booting if none
>>>> > of the early CPUs are affected by it. This is because the handling
>>>> > is implemented as alternatives, and we have already got rid of them
>>>> > by the time userspace onlines a new CPU.
>>>> >
>>>> > A solution to this is to move everything into C code, and rely on
>>>> > static keys instead. Once this is done, the feature can be allowed
>>>> > for late CPUs.
>>>> >
>>>> > [...]
>>>> 
>>>> Applied to arm64 (for-next/fixes), thanks!
>>>> 
>>>> [1/2] arm64: Move handling of erratum 1418040 into C code
>>>>       https://git.kernel.org/arm64/c/d49f7d7376d0
>>>> [2/2] arm64: Allow booting of late CPUs affected by erratum 1418040
>>>>       https://git.kernel.org/arm64/c/bf87bb0881d0
>>> 
>>> NOTE: patch 2 seems to have come in through a stable merge onto 
>>> Chrome
>>> OS 5.4 and is causing a regression when resuming from suspend.  In 
>>> the
>>> short term we've got a revert going into our tree:
>>> 
>>> https://crrev.com/c/2399101
>>> 
>>> ...but that's obviously not a long term fix.  I haven't done any
>>> debugging of this myself, though I can if there's nobody more
>>> qualified to do it and/or nobody else has time.  I'm just trying to
>>> make sure that the problem is reported somewhere where others might
>>> notice it rather than in an obscure Chrome OS tree.  ;-)
>>> 
>> 
>> The rootcause is pretty straightforward however I'm afraid the
>> solution isn't so but I may be mistaken, so this happens on
>> big.LITTLE systems with CPUs differing in erratum 1418040
>> which was applicable only for big cores and not little cores.
>> So when trying to bringup little cores during resume, there
>> is a conflict as below (messages snipped from the internal bug
>> for more visibility).
>> 
>> Enabling non-boot CPUs ...
>> CPU features: CPU1: Detected conflict for capability 35 (ARM erratum
>> 1418040), System: 1, CPU: 0
>> CPU1: will not boot
>> CPU1: will not boot
>> CPU1: failed to come online
>> psci: CPU1 killed (polled 0 ms)
>> CPU1: died during early boot
>> Error taking CPU1 up: -5
> 
> This is becoming very annoying... By allowing the buggy CPUs to come
> in late, we have made it impossible for the good ones to work 
> correctly.
> 
> Can you try this (untested yet, I'm dealing with another bucket of
> errata at the moment):
> 
> diff --git a/arch/arm64/kernel/cpu_errata.c 
> b/arch/arm64/kernel/cpu_errata.c
> index 6c8303559beb..fcf7f763400c 100644
> --- a/arch/arm64/kernel/cpu_errata.c
> +++ b/arch/arm64/kernel/cpu_errata.c
> @@ -477,6 +477,7 @@ const struct arm64_cpu_capabilities arm64_errata[] 
> = {
>  		.capability = ARM64_WORKAROUND_1418040,
>  		ERRATA_MIDR_RANGE_LIST(erratum_1418040_list),
>  		.type = (ARM64_CPUCAP_SCOPE_LOCAL_CPU |
> +			 ARM64_CPUCAP_OPTIONAL_FOR_LATE_CPU |
>  			 ARM64_CPUCAP_PERMITTED_FOR_LATE_CPU),
>  	},
>  #endif
> 

Yes, this works.

Thanks,
Sai

-- 
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a 
member
of Code Aurora Forum, hosted by The Linux Foundation

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-09-11 16:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-31 17:38 [PATCH v3 0/2] arm64: Allow erratum 1418040 for late CPUs Marc Zyngier
2020-07-31 17:38 ` [PATCH v3 1/2] arm64: Move handling of erratum 1418040 into C code Marc Zyngier
2020-07-31 18:00   ` Stephen Boyd
2020-07-31 17:38 ` [PATCH v3 2/2] arm64: Allow booting of late CPUs affected by erratum 1418040 Marc Zyngier
     [not found] ` <159803353178.13439.17036526669146072985.b4-ty@arm.com>
2020-09-09 14:53   ` [PATCH v3 0/2] arm64: Allow erratum 1418040 for late CPUs Doug Anderson
2020-09-10 13:43     ` Sai Prakash Ranjan
     [not found]     ` <3d5f6d5289304c558830d5fb8820e6cb@codeaurora.org>
2020-09-11 13:30       ` Marc Zyngier
2020-09-11 16:34         ` Sai Prakash Ranjan [this message]
     [not found]         ` <51c30228d9fe3dd6e2a55991831e95b0@codeaurora.org>
2020-09-11 16:42           ` Will Deacon
2020-09-11 17:47             ` Marc Zyngier

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=010101747e049e19-cd34cdd9-28ef-439f-9cf6-98fc94b4639d-000000@us-west-2.amazonses.com \
    --to=saiprakash.ranjan@codeaurora.org \
    --cc=catalin.marinas@arm.com \
    --cc=dianders@google.com \
    --cc=groeck@chromium.org \
    --cc=kernel-team@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=maz@kernel.org \
    --cc=mka@chromium.org \
    --cc=suzuki.poulose@arm.com \
    --cc=swboyd@chromium.org \
    --cc=will@kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.