From patchwork Wed Dec 4 17:55:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 180839 Delivered-To: patch@linaro.org Received: by 2002:a92:3001:0:0:0:0:0 with SMTP id x1csp949323ile; Wed, 4 Dec 2019 10:16:18 -0800 (PST) X-Google-Smtp-Source: APXvYqzEnFexf7ojlbxdhEYnL483Y9rZeUWOWL8XeVPs7a9qppsd6kE7+WfahOX/fjLLWMJHr8Z3 X-Received: by 2002:a05:6830:1f28:: with SMTP id e8mr3284536oth.173.1575483025649; Wed, 04 Dec 2019 10:10:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575483025; cv=none; d=google.com; s=arc-20160816; b=IzfooSM9mWr4toU3YY6Bd9+Ogo1waODCkH9OuiKbP3nH8BcJjhjjoXqsHLzIQ27QM8 Nf1aixyRX4n48MwTaXILIF2kxzaAon2YKyCcp5QZE5PnE7vwFhkGXMVmvn1EJ+JOEMAv 2mEICR/fI09FayDVGWNBZNJ8jq29oyiC6BlrW8Sxqzmuv9IgnjIn3nR7NpgNPgd3RMhG V+1D7bFlDOXM4J35t41bxPYIeOBnjGbEtfRJbIQcp47RlwR67UOQn3C/FLkCiPvco5Cj 5x1SxWqIPW1eTVgcTx2kgv19tYxynOQYY8+AJYGuigXaAFFrXi+jvgXFsWFtZFTL9KZe Fqyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=H/i84qZ8pUljVMQ84z10UkDgDRocCAgRPcT+3R6c3yE=; b=aQ/KNsPY9XNmPn9m/x3Bfm6SvXFNdjJXVnFoV6Uo1ujOoHvmVKOroe87Gtq6TUJ7PH bUYyPfoK79iCZYUc6U7YmJZDZoc32Xlij0Wem2inp9IBmHT6hhhPGiC8J/bCU/rq/B22 FckaXpTVJVFtuLqny4S7M2VYXKg8s0k3AOQmS86nZrveGu0pfrsYzNZoRVpIz4J/SP68 zZBaKj7+O5X9co5SWABD62yMi360kbvcNhw6jNyMLUnl/MXa28hYuCvDzsuj9sZp0UAv t3m19o0ZBfhkW6OuWnde2XVc2HEEnJYg7jGnwcj0Du4vPLteYBvR6L0GtVMb+wgnnVf1 OnmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XA2ID4Pg; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f23si3873471otc.88.2019.12.04.10.10.25; Wed, 04 Dec 2019 10:10:25 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XA2ID4Pg; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730186AbfLDSKY (ORCPT + 15 others); Wed, 4 Dec 2019 13:10:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:37576 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731257AbfLDSKY (ORCPT ); Wed, 4 Dec 2019 13:10:24 -0500 Received: from localhost (unknown [217.68.49.72]) (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 2F0DE206DF; Wed, 4 Dec 2019 18:10:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575483023; bh=wwf59jvlmgAHxBsSVCN3Drer6FJuWS1VyOrFqmPPIZI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XA2ID4PgNDqMfteUxfkxqkwsTtwjWrVTOQAE+9bgegOT8qDOu1pv2BO5UbqnjqOlF 5oFr9RUCloEGzMqa9cQFGDPmivLltw5MTP7vLjILhQoCHHq9N+4kgyt0ZPq6bjTK/x efbdK/UVLhqgxtWR9ap0lg9dEvufgf12DQS3WXsI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Steve Capper , Will Deacon , Suzuki K Poulose , Sasha Levin Subject: [PATCH 4.9 020/125] arm64: smp: Handle errors reported by the firmware Date: Wed, 4 Dec 2019 18:55:25 +0100 Message-Id: <20191204175318.319074728@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191204175308.377746305@linuxfoundation.org> References: <20191204175308.377746305@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Suzuki K Poulose [ Upstream commit f357b3a7e17af7736d67d8267edc1ed3d1dd9391 ] The __cpu_up() routine ignores the errors reported by the firmware for a CPU bringup operation and looks for the error status set by the booting CPU. If the CPU never entered the kernel, we could end up in assuming stale error status, which otherwise would have been set/cleared appropriately by the booting CPU. Reported-by: Steve Capper Cc: Will Deacon Signed-off-by: Suzuki K Poulose Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/smp.c | 1 + 1 file changed, 1 insertion(+) -- 2.20.1 diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index f0c41524b052f..b2d6de9f6f4fb 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -173,6 +173,7 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle) } } else { pr_err("CPU%u: failed to boot: %d\n", cpu, ret); + return ret; } secondary_data.stack = NULL;