Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3296030pxk; Mon, 21 Sep 2020 09:57:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgg5aij8ksghKd0fUx4ecaJEayvLwO+9i6Vu67MRDzp3lzlLOo2UrxfRoUZFiNiVo1q6oY X-Received: by 2002:a17:906:f950:: with SMTP id ld16mr329406ejb.489.1600707456615; Mon, 21 Sep 2020 09:57:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600707456; cv=none; d=google.com; s=arc-20160816; b=SLHXuHcjc2vgKXoh7cN29nYGkL9cwdb26ePawryeCZzRaqR31xgCEFscwWtPbErAnJ DIn2zW9MQh9aX1cNjWOqd+y6wZKfJpo3aR5rI/BMhqfc0TkcSWYsUav0dUZ+A2vKcC1U +WYgNL18Hc+yC2BModMCohxGVwuh+lRVR43QPq6qUnNarOQskrYfVjqZ0woX/rHGYPWJ yVwp90AB8XbXvGdn2r5Oas5LzMpxQBNMyFlGowz6iI3C8/Yphrmo604jYESTg/NzqBEp EU5Qi5gA9cyAB+eBsWZrpVDr50mnvNIjKurT7Dl1WiLMGaUNEiEGoAZl9J0bNzBg4Myj yRHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=I3agp/cfkCZ7s5RWnIYHN8laogqFexYdpCmHisXJ4iw=; b=p7EsW3BQR+uyeLdAPbwI7D16b6P/NrXIgpp2IsSt9yfa6UK8j++7wSDt9Gu7n5TnhR GlliWbx/LfweSmYJyj+ZXMRrRNscvt1Hi5ChKUyi0vy7sEZvcDUnLbwlJhp+VimoSPg0 q9CHoCQ1CAh4957UnzQWwh7U3hAR8aU4555F/r422bRGguzUnMidsxcj5ibhZ4Bkm8OV JobJ/o6BCRvJ8YQf2ot2SQhizvzwfNpLtkJW94+t1/VjJWL2CMVHLD7YSbwGUD4Y0Cpz 0TH1Hed4c/aaIn1I9VCiAsWMyfsvTqOCSj/aK9VQbDi7RsdE1ox4m/l7R+xIS1ggvHYn XY8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RwmcGcJM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mf8si8547227ejb.197.2020.09.21.09.57.12; Mon, 21 Sep 2020 09:57:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RwmcGcJM; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729736AbgIUQpH (ORCPT + 99 others); Mon, 21 Sep 2020 12:45:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:50484 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729179AbgIUQow (ORCPT ); Mon, 21 Sep 2020 12:44:52 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 8B51C235F9; Mon, 21 Sep 2020 16:44:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706692; bh=Gx8ysEEc8dEDyDobsWAYRbCgslU4BB8f31Oe+6ZlwYc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RwmcGcJMpFwW3Pe/y7hl2867KlwjNFqBYhwZ/jxR6c+x8/jPosChcaOZbWIsFxt29 BA6GEVZLl/A7ezHc7Zwwf6yuQYNANM+t49KgngEQf0q0Z6gvJP2MgINWjOFiBFCtHJ p0dAn0ZJYmCbR2PZg+IaYKnefS2Qo/bzhPL+pU0M= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Matthias Kaehlcke , Marc Zyngier , Sai Prakash Ranjan , Will Deacon , Catalin Marinas , Sasha Levin Subject: [PATCH 5.8 054/118] arm64: Allow CPUs unffected by ARM erratum 1418040 to come in late Date: Mon, 21 Sep 2020 18:27:46 +0200 Message-Id: <20200921162038.848253516@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marc Zyngier [ Upstream commit ed888cb0d1ebce69f12794e89fbd5e2c86d40b8d ] Now that we allow CPUs affected by erratum 1418040 to come in late, this prevents their unaffected sibblings from coming in late (or coming back after a suspend or hotplug-off, which amounts to the same thing). To allow this, we need to add ARM64_CPUCAP_OPTIONAL_FOR_LATE_CPU, which amounts to set .type to ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE. Fixes: bf87bb0881d0 ("arm64: Allow booting of late CPUs affected by erratum 1418040") Reported-by: Matthias Kaehlcke Signed-off-by: Marc Zyngier Tested-by: Sai Prakash Ranjan Tested-by: Matthias Kaehlcke Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200911181611.2073183-1-maz@kernel.org Signed-off-by: Catalin Marinas Signed-off-by: Sasha Levin --- arch/arm64/kernel/cpu_errata.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/cpu_errata.c b/arch/arm64/kernel/cpu_errata.c index 2c0b82db825ba..422ed2e38a6c8 100644 --- a/arch/arm64/kernel/cpu_errata.c +++ b/arch/arm64/kernel/cpu_errata.c @@ -910,8 +910,12 @@ const struct arm64_cpu_capabilities arm64_errata[] = { .desc = "ARM erratum 1418040", .capability = ARM64_WORKAROUND_1418040, ERRATA_MIDR_RANGE_LIST(erratum_1418040_list), - .type = (ARM64_CPUCAP_SCOPE_LOCAL_CPU | - ARM64_CPUCAP_PERMITTED_FOR_LATE_CPU), + /* + * We need to allow affected CPUs to come in late, but + * also need the non-affected CPUs to be able to come + * in at any point in time. Wonderful. + */ + .type = ARM64_CPUCAP_WEAK_LOCAL_CPU_FEATURE, }, #endif #ifdef CONFIG_ARM64_WORKAROUND_SPECULATIVE_AT -- 2.25.1