Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp8640258ybl; Thu, 16 Jan 2020 21:34:41 -0800 (PST) X-Google-Smtp-Source: APXvYqxbuhVj2c6GhHnhW7dfrZXLLXfpziU+RmyG9BkXuGdzPY81tmTqQEIeg3hgOfULVJPXnerB X-Received: by 2002:aca:af8b:: with SMTP id y133mr2206959oie.73.1579239281430; Thu, 16 Jan 2020 21:34:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579239281; cv=none; d=google.com; s=arc-20160816; b=sx2ra7GOvW3LWkUH8rOxCruLsDDY/axzMTQQLb3E8QV3dZvY5ShN3pZB6BF8BCAFCB QKnhAOue6lmuM5lSBU2U3qbaxxBZ2poJ9UX+WkdoFt4FY/9BQTq4VrhpiGieARcqyJeT cYFWYzTNM3v2OrGqpMDP6R2Itn0LLSsYXD12th5S1TgUpSTUtgr9CGXwTIslHYd54Csp RGWhBSFq+a+obg6JoUPhJyAngE++iq/MCxB0kZ0cHv4Wo31gGavQB3PPMZFikyKSt2NB AxGfSgSl7CwXRT+j705n9PfQlY/KlX4NIF1sDKj4ZfqgaDZay1QXO5FzxNAj1Dqg8zUO j54Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=mRpBlfriiKBtpHdle3gY+6OvDi0xi+PHO3+1yxBhNW0=; b=GgRDLxFjX5XLOJ4wq+gACiwPqjdufIDeF3lhYqz+0UvoYNJiq6PjFBtGHaokvrVrsh 1t/dnEaIik/Uqs8XjwglmU2ttwo7+wCknMBcVy3Fc+TpkRBDsgho49HH8qx5Z5zC0tq6 q1pf+xH8bELN7RtyHuPQfnXwRSi7G7vfbSNng+pqi3xpTebVrdUciaf142Vh8DoTeqtc mtUdwzE7Q3mjlCGI74PocxR4amgR+hF6GH8WbVrH6aviU+XOWP/oijnXNH0CNHt9H/kY 6mPCZDE+VpKVsXuJq36Gq0FHT3rcmF5i6HSzPzg2TaVMCgPgmtjGCXKSWzt3sOeo9HvJ Fuow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=YpgoWq+f; 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 m8si12846349oim.180.2020.01.16.21.34.30; Thu, 16 Jan 2020 21:34:41 -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; dkim=pass header.i=@landley-net.20150623.gappssmtp.com header.s=20150623 header.b=YpgoWq+f; 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 S1730014AbgAQEQc (ORCPT + 99 others); Thu, 16 Jan 2020 23:16:32 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:42987 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729139AbgAQEQc (ORCPT ); Thu, 16 Jan 2020 23:16:32 -0500 Received: by mail-pg1-f196.google.com with SMTP id s64so10995356pgb.9 for ; Thu, 16 Jan 2020 20:16:31 -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=NqhYsCwO61Q5ixt4AxnXprVH4O0ypq009IZrPEB2LkbPzVVY0kkigWX1hMLEfJzxcg e4JTeQDos0GEonpDkkPs1FEAfdlt3oNohhYNLLrOdTBMmqoRLRcPejeYr5sIxCoLiYuu DSVgVsVotVJR+jXRAbMFhry0OhozQF9Kw1+xrGS9/o0Lv/wbJ6iacdiuM3vEIWL2LrPc K3vBuq8JhYIt3+3wwVK64qtXftk4RRKWC37JSVEF7K//fhqY3PhB6Ifq2xP0NkXiSqgd d0I8f+4h4byfMrlem75xZzzgzdz5pzFPq5BQpSYRDNVc09+k0v1UOt7D7xBO7jKc1fxK oZdA== X-Gm-Message-State: APjAAAWdLi75GEkl4cMMr2jfAGkFM3WrJ/yel2saaHb5b/1INpOsBwt1 kKE0+7RnGk7Y7QyENNpNgk3nsQ== 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 Cc: Josh Poimboeuf , Ingo Molnar , Peter Zijlstra , Jiri Kosina , Pavankumar Kondeti , Vitaly Kuznetsov , Aaro Koskinen , Greg Kroah-Hartman , Will Deacon , Fenghua Yu , James Morse , Mark Rutland , Heiko Carstens , Guenter Roeck , Stephen Boyd , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-xtensa@linux-xtensa.org, linux-pm@vger.kernel.org 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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