Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3887331ybl; Tue, 21 Jan 2020 08:51:48 -0800 (PST) X-Google-Smtp-Source: APXvYqynJDpEmKQ6jKXGYVkAeEZK45/JahQL8FbyquLs04x6AxHjXIjsHo6dU8wBxgP26MEJneA2 X-Received: by 2002:a05:6830:1e16:: with SMTP id s22mr4292879otr.340.1579625508075; Tue, 21 Jan 2020 08:51:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579625508; cv=none; d=google.com; s=arc-20160816; b=XzUGtvQdkPWW6h9pPpfZz9W41Yu5zkzJsCL+V6DhIBuuPWJjoZ6MHPxF1CMCJigPBM G/nmxEqyTegahASlsUmzgE8NprWdqLWPLl8KN1JAURv3qcGZA7tPa0Jf4quMtZze+YwZ kLmQzU5YbWBeDVBvlSpvXd94eij0O3x7wtTQbwmQFSj/Mqk/qBMPiezhuTAmRLIm76wS XYZREnyYOpO4r2fLeqhucDYDZqYVGbCzLKZihkKTIDeyMi8XfT6dyCX/RcNuvePqliwW eRPpvPIgEt5RI1ES7C2D1To3WfnJc1CgY9WliLAAxPK/qbX+gdYBinSVJyXlwa16LArS QU2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=3Nfes4hdCu0FWql8Lq1w6s1seHVv7pHFUeB8tIyIcXk=; b=FIM6Y4lpqkF5i5yhOm6yr8yfeVMOsxEoEUIuyVcwDUaMIBZ9WJ9JodH8zH1k6vBhDT 8F7g4Cw+q9Y05bkOju4I+ehTSyK64zr4xgNpLqZIVabYoXITPI6Os5A2RwFyGyfAYN93 4QgPABvNpDFoYrCRPKWnmNq3+ClJw5AM0CKAoNZj673acRKhtKyEQvAWJzCIRM7I7v4f N/cAIgVVaWSZCqR75/pK4Q8IRuvR98Toy1qg58vAL3NxtZ8ubnT9k16wtcs1jF/nY9Js DEARhHxXAmnv5V2i2aXSLJKqBRvXTXcvGNx2DHhj30HcK+k4G7Ak4CcLqZ6d+wEuvWw6 XllQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 x23si88984otq.41.2020.01.21.08.51.34; Tue, 21 Jan 2020 08:51:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729130AbgAUQuf (ORCPT + 99 others); Tue, 21 Jan 2020 11:50:35 -0500 Received: from foss.arm.com ([217.140.110.172]:45782 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728779AbgAUQuf (ORCPT ); Tue, 21 Jan 2020 11:50:35 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7EA1F328; Tue, 21 Jan 2020 08:50:34 -0800 (PST) Received: from e107158-lin.cambridge.arm.com (e107158-lin.cambridge.arm.com [10.1.195.21]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 7F36C3F6C4; Tue, 21 Jan 2020 08:50:33 -0800 (PST) Date: Tue, 21 Jan 2020 16:50:31 +0000 From: Qais Yousef To: Thomas Gleixner , Greg Kroah-Hartman Cc: Russell King , Catalin Marinas , Will Deacon , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 03/14] arm: arm64: Don't use disable_nonboot_cpus() Message-ID: <20200121165030.xksivf6mrhsaynq2@e107158-lin.cambridge.arm.com> References: <20191125112754.25223-1-qais.yousef@arm.com> <20191125112754.25223-4-qais.yousef@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20191125112754.25223-4-qais.yousef@arm.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/25/19 11:27, Qais Yousef wrote: > disable_nonboot_cpus() is not safe to use when doing machine_down(), > because it relies on freeze_secondary_cpus() which in return is > a suspend/resume related freeze and could abort if the logic detects any > pending activities that can prevent finishing the offlining process. > > Beside disable_nonboot_cpus() is dependent on CONFIG_PM_SLEEP_SMP which > is an othogonal config to rely on to ensure this function works > correctly. > > Signed-off-by: Qais Yousef > CC: Russell King > CC: Catalin Marinas > CC: Will Deacon > CC: linux-arm-kernel@lists.infradead.org > CC: linux-kernel@vger.kernel.org > --- Ping :) I'm missing ACKs on this patch and patch 4 for arm64. Hopefully none should be controversial. Thanks! -- Qais Yousef > arch/arm/kernel/reboot.c | 4 ++-- > arch/arm64/kernel/process.c | 4 ++-- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/arch/arm/kernel/reboot.c b/arch/arm/kernel/reboot.c > index bb18ed0539f4..58ad1a70f770 100644 > --- a/arch/arm/kernel/reboot.c > +++ b/arch/arm/kernel/reboot.c > @@ -88,11 +88,11 @@ void soft_restart(unsigned long addr) > * to execute e.g. a RAM-based pin loop is not sufficient. This allows the > * kexec'd kernel to use any and all RAM as it sees fit, without having to > * avoid any code or data used by any SW CPU pin loop. The CPU hotplug > - * functionality embodied in disable_nonboot_cpus() to achieve this. > + * functionality embodied in smp_shutdown_nonboot_cpus() to achieve this. > */ > void machine_shutdown(void) > { > - disable_nonboot_cpus(); > + smp_shutdown_nonboot_cpus(0); > } > > /* > diff --git a/arch/arm64/kernel/process.c b/arch/arm64/kernel/process.c > index 71f788cd2b18..3bcc9bfc581e 100644 > --- a/arch/arm64/kernel/process.c > +++ b/arch/arm64/kernel/process.c > @@ -141,11 +141,11 @@ void arch_cpu_idle_dead(void) > * to execute e.g. a RAM-based pin loop is not sufficient. This allows the > * kexec'd kernel to use any and all RAM as it sees fit, without having to > * avoid any code or data used by any SW CPU pin loop. The CPU hotplug > - * functionality embodied in disable_nonboot_cpus() to achieve this. > + * functionality embodied in smpt_shutdown_nonboot_cpus() to achieve this. > */ > void machine_shutdown(void) > { > - disable_nonboot_cpus(); > + smp_shutdown_nonboot_cpus(0); > } > > /* > -- > 2.17.1 >