Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp665844ybb; Fri, 20 Mar 2020 06:08:31 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvDiuojjgHiwKee1EFwBuZ8zITIP44/5hBzWEln7eNUuoTKLEMiEcOpJzeQkxkTTUKJ2qSn X-Received: by 2002:aca:af93:: with SMTP id y141mr6062623oie.144.1584709711349; Fri, 20 Mar 2020 06:08:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584709711; cv=none; d=google.com; s=arc-20160816; b=DTT+nKoA5AI0ieTCI+oCfEPI/vz4g1yrjkj1yi5kuG8nlgq1ggfg8GzOHDBUTs6WNJ 53RK170TbMDLl8nQ0ZR+tRPEBoxOrKtM81teAiPFGtMig3mia8JOW3V891hjv3k/hntn axaaFrhhnBbaVSKeAu8DCJLKoKEfjYT0HWhGYVti6AQ0zSt8xNfBWcFamzQEObRxy6Sa isdSu+tPGlZgnRQDXUo9YErDShDIs4le1IsLIE2Nekztg0rnIpvQQ/9UkPHxWNwAUKOG l94OXe8qfOK9GVYYjYkJN1JmBcaCfl00j4BhL3dHw/UmPOo4lP4AobOkdyhBKW68dLzD tZ0g== 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:dkim-signature; bh=UruEh+QPWdIyoj6UKAjvgmG3F1nB4TGGozNiE2Ak4pc=; b=EycgrDj+TnfEUeKk4x3y1uOJxz/W3clL8xbOTQFKz2Sjtzgl1AMIRuOuxQeIuqAB8+ 7/K+EXkpoDzdyrOdOrSt9d75FCkiAAFun4zVmijHGkSaXUKXu7T7w7PmKZ1n9d31Nb+z TT3/rL+By7iePFXPoq9CgIIidrQpK5pNqlQtEKYwVcyo7ia9J6hPddl7YxbLM9nLBeqb VDnSA/DC40Lg0xkqT23JQvAebzYnmeCoavdCLSh1EX2QJeJJMO4P3VyM9PC2+U+cOtNg Iyd5oC7+UPLTNF8BgJpFa6R7llDRcRJMPL5PXWv7p9ci8I9IV/ejQV8YK2OE6DnWacpp ROsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=C10XJss4; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g81si2547863oia.8.2020.03.20.06.07.56; Fri, 20 Mar 2020 06:08:31 -0700 (PDT) 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; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=C10XJss4; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727101AbgCTNHN (ORCPT + 99 others); Fri, 20 Mar 2020 09:07:13 -0400 Received: from pandora.armlinux.org.uk ([78.32.30.218]:60966 "EHLO pandora.armlinux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726954AbgCTNHN (ORCPT ); Fri, 20 Mar 2020 09:07:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=UruEh+QPWdIyoj6UKAjvgmG3F1nB4TGGozNiE2Ak4pc=; b=C10XJss4RLdfq+4z3wT/a+fgR tObaHD6QoI3lh7aLZROqwKhC1Sqv97jd+JrGbdu3hcTcd+VgxgM2Iw+yCyyKnY+GSUy8G4UrkQhLE TV8fYLln/wpBktD5R+BWmmH7epdgvg4qrOeKps6QyAhmflVmx/9s5iNflLUnNgUiIdgRC3vMcediF QfLm0zI7iVFx0DXiV6pdfmkrJUtb7CYJkf8Q+/XJ3ADVQI9O6ffdbKQ0MqSGUrot7qyQJDB1qeyiR ijaOXbXNBH2f67DwMeVtqSP26LdG+lii9zV5J7b/ncmKurxaVcnUOAKHfb62xCrIpYHTwK3XhJgda 9yCQuLFHw==; Received: from shell.armlinux.org.uk ([2002:4e20:1eda:1:5054:ff:fe00:4ec]:34882) by pandora.armlinux.org.uk with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jFHMc-0008Pq-U1; Fri, 20 Mar 2020 13:07:03 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.92) (envelope-from ) id 1jFHMb-0005ni-1d; Fri, 20 Mar 2020 13:07:01 +0000 Date: Fri, 20 Mar 2020 13:07:01 +0000 From: Russell King - ARM Linux admin To: Qais Yousef Cc: "Paul E . McKenney" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Thomas Gleixner Subject: Re: [PATCH v3 04/15] arm: Don't use disable_nonboot_cpus() Message-ID: <20200320130700.GR25745@shell.armlinux.org.uk> References: <20200223192942.18420-1-qais.yousef@arm.com> <20200223192942.18420-5-qais.yousef@arm.com> <20200320110430.jozfyrqqx272266u@e107158-lin.cambridge.arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200320110430.jozfyrqqx272266u@e107158-lin.cambridge.arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 20, 2020 at 11:04:31AM +0000, Qais Yousef wrote: > On 02/23/20 19:29, Qais Yousef wrote: > > 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. I think that should be a separate change - you have two separate changes in this patch: 1. to switch to using the new helper. 2. to change the CPU that we potentially use for the final steps of shutdown These should be two seperate changes, so if (2) causes a regression it can be reverted independently of (1). > > > > Signed-off-by: Qais Yousef > > CC: Russell King > > CC: linux-arm-kernel@lists.infradead.org > > CC: linux-kernel@vger.kernel.org > > --- > > Hi Russel > > Does the updated version look good to you now? > > Thanks > > -- > Qais Yousef > > > 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 > > > -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTC broadband for 0.8mile line in suburbia: sync at 10.2Mbps down 587kbps up