From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AE91C33C9E for ; Fri, 17 Jan 2020 04:18:50 +0000 (UTC) Received: from lists.ozlabs.org (unknown [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D9D542083E for ; Fri, 17 Jan 2020 04:18:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=landley-net.20150623.gappssmtp.com header.i=@landley-net.20150623.gappssmtp.com header.b="YpgoWq+f" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9D542083E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=landley.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 47zSVb3S23zDqhK for ; Fri, 17 Jan 2020 15:18:47 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=landley.net (client-ip=2607:f8b0:4864:20::544; helo=mail-pg1-x544.google.com; envelope-from=rob@landley.net; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=landley.net Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=landley-net.20150623.gappssmtp.com header.i=@landley-net.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=YpgoWq+f; dkim-atps=neutral Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 47zSS73QJSzDqmX for ; Fri, 17 Jan 2020 15:16:34 +1100 (AEDT) Received: by mail-pg1-x544.google.com with SMTP id k197so10996917pga.10 for ; Thu, 16 Jan 2020 20:16:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=landley-net.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=mRpBlfriiKBtpHdle3gY+6OvDi0xi+PHO3+1yxBhNW0=; b=YpgoWq+f5KBHqJRceCkoXiAZ2cahZQK+2UyaAJe+K9OIe+XXcWUZL8U209yNlM3H75 KA7pvnOh+24zjdkJ7WMUJ3KA1+3nkIcrRF31rPO++SI7wQlThs4GJGs5B3nYoQLKW5HT 2eh3iHvTi3Xy88JGMBRbo122EsU8mcdZ/ksMWQv5AaykeNtw4L241TPf0aaaNgQ6oplO UcCJxtf9XAGTsWbYYHU+gy2NpZnW2+Cl0nQVAovymBpgWIrdrUczQb4tNfSu/jIOSSvr fG9ZirxeCQXz5lZPNcJRcNLxJM6Wbp3fKAwDJBz0ddZdtMZOh9o+PFBxxH/QKym4+LGz VCIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=mRpBlfriiKBtpHdle3gY+6OvDi0xi+PHO3+1yxBhNW0=; b=ApBjp6VNYlDznVOW8JYDuJlccnDqfddi3eMbpuk2DnZZZr7e7HFN1zzXbO94TUEeUx 36z3fofRqA+v/chW52/FEtVR29za6xoFlesDLokp8dYoH3BLtYHF5V+EJw2TAVUUBUIQ BsnzgKEZN/xq0PwU9YDLMTIhg7H4LKqgfkLglzsge8KZjma2kQPPPKg33aVtTlCzj2Ps YAnDCNuoIkjgFNHEIOFaXkuONLqmRqQAgZb3TbrZ7PJTs0dEcJaYDP15XhmI5ewbDZKu DYwwQscFZBqpdoMMEhssag0xyQg4Z5dkUWk0J8BSrg+NstIPg+aiQfjW/3Y30eV4XrRC OrBw== X-Gm-Message-State: APjAAAVxqA4dQy422yrXsJgPhfLhg+38kSyZqx/5X53MFo3hfEYeX0FK DAF+zn740aXX2dUuOu8whIiP/g== X-Google-Smtp-Source: APXvYqxeLUKQP31a9O4MOSQTYDXXhKgO23RrfuN2OHejqkFLLCBgUZ8QQnxFYMZQ3Ktxo8BDhU+O2Q== X-Received: by 2002:a62:e30d:: with SMTP id g13mr1054005pfh.92.1579234591085; Thu, 16 Jan 2020 20:16:31 -0800 (PST) Received: from [192.168.11.4] (softbank126112255110.biz.bbtec.net. [126.112.255.110]) by smtp.googlemail.com with ESMTPSA id l66sm26355096pga.30.2020.01.16.20.16.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jan 2020 20:16:30 -0800 (PST) Subject: Re: [PATCH RESEND v4] reboot: support offline CPUs before reboot To: Hsin-Yi Wang , Thomas Gleixner References: <20200114110620.164861-1-hsinyi@chromium.org> From: Rob Landley Message-ID: Date: Thu, 16 Jan 2020 22:20:28 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20200114110620.164861-1-hsinyi@chromium.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, Peter Zijlstra , Heiko Carstens , linux-kernel@vger.kernel.org, sparclinux@vger.kernel.org, Guenter Roeck , Will Deacon , Ingo Molnar , linux-s390@vger.kernel.org, linux-csky@vger.kernel.org, Aaro Koskinen , Fenghua Yu , linux-pm@vger.kernel.org, linux-xtensa@linux-xtensa.org, Stephen Boyd , Josh Poimboeuf , Pavankumar Kondeti , linux-arm-kernel@lists.infradead.org, linux-parisc@vger.kernel.org, Greg Kroah-Hartman , linux-mips@vger.kernel.org, James Morse , Jiri Kosina , Vitaly Kuznetsov , linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" On 1/14/20 5:06 AM, Hsin-Yi Wang wrote: > This patch adds a config ARCH_OFFLINE_CPUS_ON_REBOOT, which would offline cpus in > migrate_to_reboot_cpu(). If non reboot cpus are all offlined here, the loop for > checking online cpus would be an empty loop. If architecture don't enable this > config, or some cpus somehow fails to offline, it would fallback to ipi > function. I'm curious: > +# Select to do a full offline on secondary CPUs before reboot. > +config ARCH_OFFLINE_CPUS_ON_REBOOT > + bool "Support for offline CPUs before reboot" > + depends on HOTPLUG_CPU The new symbol can't be selected without the other symbol. > + select ARCH_OFFLINE_CPUS_ON_REBOOT if HOTPLUG_CPU And the other symbol automatically selects the new one. Why are you adding a second symbol that means the same thing as the existing symbol? > +#if defined(CONFIG_PM_SLEEP_SMP) || defined(CONFIG_ARCH_OFFLINE_CPUS_ON_REBOOT) > +extern int freeze_secondary_cpus(int primary, bool reboot); > +#endif Couldn't that just test HOTPLUG_CPU? What's the second symbol for? (You can have empty stub functions when architectures don't support a thing...) Rob