From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1CC45C433E2 for ; Fri, 11 Sep 2020 13:37:07 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BD84222272 for ; Fri, 11 Sep 2020 13:37:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="bhempV8d"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="wOheBNop" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD84222272 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Message-ID:References:In-Reply-To:Subject:To:From: Date:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ug26cjMNM8pZsMNjmbpcCxtWbhKQ1+V1mcENxtFS+uc=; b=bhempV8dpPO86iKQfHtnDc8b3 L6UxIAUWE8b/URW1lN8+s853kFPVUyLqar6AvNu27jK5KSfzckPmb/FreKMTrp1oZ1LUubMt3Ym63 TNLmc/NAzdAqZmCb7HTVofZXHeLz3va30cnEGbas5ABVc1X5K01JYR7TATG3sK+vYaRVOzQp2t0Am 2RKN3yhK2WHLM3/kSgP8f2ibM4UTUIrWYSHfnr0v4O/VQV9nk497a5NlkFf1kfQM/Sn2h3o3Qp4f4 aO5b6Dkyqf7+1NqUWtj6GgNti/NIkVpV/7eMRI9nLJEYtkfPjY5JoAx+11YmtS7EMHeadZsuUEATb KLWVW0PRg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGjCc-0000wc-1O; Fri, 11 Sep 2020 13:34:58 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kGj8G-0007Ah-U3 for linux-arm-kernel@lists.infradead.org; Fri, 11 Sep 2020 13:30:30 +0000 Received: from disco-boy.misterjones.org (disco-boy.misterjones.org [51.254.78.96]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4872522266; Fri, 11 Sep 2020 13:30:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599831026; bh=qgLy9mCdh39/dXZA5r3Bgkj8xgkgY0Ppz8VapjhvJSo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=wOheBNopdGQkU5YUcnWePLBkgPXd/1E5ndBD9RWeeE+BGMg+b2GxvK8tcHvounSV/ 7bt+hlITHXfiMSTgzr8oYtMWD4yt8m19APWdSPy96DoiXXkiw1vsx8rlte9b2xIsFg ZOqnPhbDH1CtmwrSRzsy92FfXfuZufhsSAPSOghY= Received: from disco-boy.misterjones.org ([51.254.78.96] helo=www.loen.fr) by disco-boy.misterjones.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kGj8C-00B04q-Dt; Fri, 11 Sep 2020 14:30:24 +0100 MIME-Version: 1.0 Date: Fri, 11 Sep 2020 14:30:24 +0100 From: Marc Zyngier To: Sai Prakash Ranjan Subject: Re: [PATCH v3 0/2] arm64: Allow erratum 1418040 for late CPUs In-Reply-To: <3d5f6d5289304c558830d5fb8820e6cb@codeaurora.org> References: <20200731173824.107480-1-maz@kernel.org> <159803353178.13439.17036526669146072985.b4-ty@arm.com> <3d5f6d5289304c558830d5fb8820e6cb@codeaurora.org> User-Agent: Roundcube Webmail/1.4.8 Message-ID: <2ac4ab0817cd4ba26c17b93257ec6dbf@kernel.org> X-Sender: maz@kernel.org X-SA-Exim-Connect-IP: 51.254.78.96 X-SA-Exim-Rcpt-To: saiprakash.ranjan@codeaurora.org, dianders@google.com, catalin.marinas@arm.com, will@kernel.org, suzuki.poulose@arm.com, linux-arm-kernel@lists.infradead.org, kernel-team@android.com, swboyd@chromium.org, mka@chromium.org, groeck@chromium.org X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200911_093029_130050_058B9AC1 X-CRM114-Status: GOOD ( 24.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Will Deacon , Suzuki K Poulose , Catalin Marinas , Doug Anderson , Matthias Kaehlcke , Guenter Roeck , Stephen Boyd , kernel-team@android.com, Linux ARM Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 >> 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 Thanks, M. -- Jazz is not dead. It just smells funny... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel