Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1644591ybv; Sun, 23 Feb 2020 11:32:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyXN40tllxUgGEYWQR+8/4SPiS5oVKC0wRNfuW80Yy/nx9F6jYrNj1l7/1HD/r6FSgZ2Jd/ X-Received: by 2002:aca:4106:: with SMTP id o6mr10022833oia.173.1582486343095; Sun, 23 Feb 2020 11:32:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582486343; cv=none; d=google.com; s=arc-20160816; b=QOb7yvqvoWbFp9Mq1wDMRGDmcitZ4OTBqz9Ivab6Mj30/aPCoPjiF0jKtjhXNqnvgv 0VoR4sha+zHj7V57Fl1w030zV1LpEMdGjoy5kDCusHLDFLCXNlYqjEqLA9O6dSr5A9en DO4sZIcGOrTrYdu+WGZJX8znOSp5R21eBjLJ/RUbF0NqmlQKxlMHubBWqNJARC77+DbE RdfDln6/NVYLukw+oQ2wbICmbbQRTl96FBNlZ7muLp2LxRqv1kPdCj3tCXJ0QWsWZlb2 4VhkWpa3kDK82eDUjLJCUqv32z1VKuyHzVjrAKtNV/r57kEhQYYJqsopuPvebpgQ8r+c c/Cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=pflYH978CHhmgInxsHw/PDUX9rT3HbKKckHV8o7Fmsc=; b=IJjoYzyy8pJQH6nUkJr+mU7Ktyhow/HW/I1MS/VIbgTDum07WVcqc5+NRn7Zv6AAS2 y56Wprxkj4WtZT3+S9TAGfK/M443+R/9cgU0jkvl+2IFkPWWbZTSKh82LpPo+oM7b323 QQanC6EruOvInbZQVdLo3rDf4CsA/5gZ/1wdq7loonk/usb2L5VNy6TuETkKLClgGvWP EYN2OoRQKYU7PcLvSltWwD2AOhtLMNAsBdaM4OUWsutWju7WZEzGTDTGV6fBpbbiuFSG h8B0vwbhrNT9Pp7tpyroDigxDzup6r+tmLjvD/nDIWfENsF7WQx6mfWi7xYVOp3E1NKK k/nA== 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 n11si5194802otk.290.2020.02.23.11.32.11; Sun, 23 Feb 2020 11:32:23 -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 S1727470AbgBWTal (ORCPT + 99 others); Sun, 23 Feb 2020 14:30:41 -0500 Received: from foss.arm.com ([217.140.110.172]:51318 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726208AbgBWT37 (ORCPT ); Sun, 23 Feb 2020 14:29:59 -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 490CF1396; Sun, 23 Feb 2020 11:29:59 -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 7F4973F6CF; Sun, 23 Feb 2020 11:29:58 -0800 (PST) From: Qais Yousef To: Thomas Gleixner Cc: "Paul E . McKenney" , Qais Yousef , Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v3 04/15] arm: Don't use disable_nonboot_cpus() Date: Sun, 23 Feb 2020 19:29:31 +0000 Message-Id: <20200223192942.18420-5-qais.yousef@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200223192942.18420-1-qais.yousef@arm.com> References: <20200223192942.18420-1-qais.yousef@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org disable_nonboot_cpus() is not safe to use when doing machine_down(), because it relies on freeze_secondary_cpus() which in turn 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. Use `reboot_cpu` variable instead of hardcoding 0 as the reboot cpu. Signed-off-by: Qais Yousef CC: Russell King CC: linux-arm-kernel@lists.infradead.org CC: linux-kernel@vger.kernel.org --- arch/arm/kernel/reboot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/kernel/reboot.c b/arch/arm/kernel/reboot.c index bb18ed0539f4..0ce388f15422 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(reboot_cpu); } /* -- 2.17.1