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=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 AA9D7C2D0C1 for ; Thu, 19 Dec 2019 15:48:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8074524684 for ; Thu, 19 Dec 2019 15:48:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eJqmNR4y" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726813AbfLSPs7 (ORCPT ); Thu, 19 Dec 2019 10:48:59 -0500 Received: from mail-vs1-f66.google.com ([209.85.217.66]:36221 "EHLO mail-vs1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726789AbfLSPs6 (ORCPT ); Thu, 19 Dec 2019 10:48:58 -0500 Received: by mail-vs1-f66.google.com with SMTP id u14so4057795vsu.3 for ; Thu, 19 Dec 2019 07:48:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1kaCXRwivzzZ0gDYQMxNb5fZvTKN4Drl/BBA8SeSbvk=; b=eJqmNR4yFeu1cbLSw2uG6FfugRqV5dKrxt2YHM9/D9gMpcABkEbswYB8eSaWcXntOS mbzjrlF4O2WmbzpBXute4ocZBEnBpbzA6iYMkzyKvI+SbBvchcUgGJBf7naGlw0opObr Y46WQiGzBy9SAfjvmPCjmgu7s1paeIAIkRgQj28RQUdH1fEnycR6Ld5+bUHwcj/+yRBT exdptdE4Lz73b68vBf2XsQ6q5pulrH8ik5cIQ78uzWYC7MxBF+XFn7DZND19tlp2/pXx S14ROpwyoKDClO+2CXDOhgR267n7rlVXK8wIkviSg/eYL8mbvcAGMc1ZHbyKQ/FNcKLC XbqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1kaCXRwivzzZ0gDYQMxNb5fZvTKN4Drl/BBA8SeSbvk=; b=hWf9kEY8/TuxeD4l1h3JICzctf/vM8QtUtxWm8RkF2kSTryTrUY6fCQGJp7EaPg/SP +qdC/1CprgtcxHkDHX5UUPzGE2MGYQRgRLiUck5dE8ZcR1T6JhMGWiZQxuGiIMNhzO3o 1NGS8sHc/T25ZT4Gz26urmupFFf4dUNWCRPFHb3mIk5dmhb0QZtoBJjOWal1FTZY9Hl8 ntRXSpOIEcLBx+obPQWn6DF0qL7dsV6sflOnqbTeOz9F/cIkgruzVqCiJNQdfJ6QpESJ t+3uS2jPHk4zqYE43UYPebR9HGwE21Bb2EyDzjMG37uhNfXYUfGaiapMF+3DVKN3mPgh VyLQ== X-Gm-Message-State: APjAAAVWg+TUxOxJv0dIueKE52GsZYjj8PylYcMR0hD214zA5azJGuDv MkXOmjejT3GHpXYe2J0tZLj+Rl/vKS8VdvJ0Feir8R4V X-Google-Smtp-Source: APXvYqyEHXTOiaWT64UHyDsh1e5xkHNXkp6qXSMXSPXq6knbbWfOcCv0hWw8oxuY1uMAA0t2E6RRJdBwf/IgoNOzarc= X-Received: by 2002:a67:f499:: with SMTP id o25mr5245791vsn.165.1576770537822; Thu, 19 Dec 2019 07:48:57 -0800 (PST) MIME-Version: 1.0 References: <20191211154343.29765-1-ulf.hansson@linaro.org> <20191211154343.29765-13-ulf.hansson@linaro.org> <20191219143340.GE20746@bogus> In-Reply-To: <20191219143340.GE20746@bogus> From: Ulf Hansson Date: Thu, 19 Dec 2019 16:48:21 +0100 Message-ID: Subject: Re: [PATCH v4 12/14] cpuidle: psci: Support CPU hotplug for the hierarchical model To: Sudeep Holla Cc: Lorenzo Pieralisi , Rob Herring , Linux PM , "Rafael J . Wysocki" , Daniel Lezcano , Mark Rutland , Lina Iyer , Vincent Guittot , Stephen Boyd , Andy Gross , Bjorn Andersson , Kevin Hilman , Linux ARM , linux-arm-msm Content-Type: text/plain; charset="UTF-8" Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Thu, 19 Dec 2019 at 15:33, Sudeep Holla wrote: > > On Wed, Dec 11, 2019 at 04:43:41PM +0100, Ulf Hansson wrote: > > When the hierarchical CPU topology is used and when a CPU is put offline, > > that CPU prevents its PM domain from being powered off, which is because > > genpd observes the corresponding attached device as being active from a > > runtime PM point of view. Furthermore, any potential master PM domains are > > also prevented from being powered off. > > > > To address this limitation, let's add add a new CPU hotplug state > > (CPUHP_AP_CPU_PM_STARTING) and register up/down callbacks for it, which > > allows us to deal with runtime PM accordingly. > > > > Signed-off-by: Ulf Hansson > > --- > > > > Changes in v4: > > - Folded in the patch to be part of the series. > > - Rebased on top of earlier changes. > > > > --- > > drivers/cpuidle/cpuidle-psci.c | 45 +++++++++++++++++++++++++++++++++- > > include/linux/cpuhotplug.h | 1 + > > 2 files changed, 45 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c > > index 6e7804e697ed..34a89d99bb0f 100644 > > --- a/drivers/cpuidle/cpuidle-psci.c > > +++ b/drivers/cpuidle/cpuidle-psci.c > > @@ -8,6 +8,7 @@ > > > > #define pr_fmt(fmt) "CPUidle PSCI: " fmt > > > > +#include > > #include > > #include > > #include > > @@ -31,6 +32,7 @@ struct psci_cpuidle_data { > > > > static DEFINE_PER_CPU_READ_MOSTLY(struct psci_cpuidle_data, psci_cpuidle_data); > > static DEFINE_PER_CPU(u32, domain_state); > > +static bool psci_cpuidle_use_cpuhp; > > > > [...] > > > + > > +static void psci_idle_init_cpuhp(void) > > +{ > > Can this be made __init along with the boolean psci_cpuidle_use_cpuhp ? Yeah, make sense! > > With that, > Reviewed-by: Sudeep Holla Thanks! Kind regards Uffe 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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 1730EC43603 for ; Thu, 19 Dec 2019 15:49:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 D13C8206EC for ; Thu, 19 Dec 2019 15:49:15 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gfuJpN8l"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="eJqmNR4y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D13C8206EC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1Q17eazJaL1gZ3Q+QfCGDyEBVkkEUuJT0KXi5E4PDjc=; b=gfuJpN8lkhkYDq pPcxG+aZ29piTgANbFiQQQoJXPdgHFgkbWBSOW8bCQsClWy2CmZ3CBIpd0fQP8sToy8ckiDjiyD4T gOTC7GOSv/4smJiJTpxRfnjOTLiE2FtUM1P0krUJ6KKzJyRAesS28g6Xe+WmEngAgG6AJBIb18Skn /bLVF54INLOD9BcRScFZYyvUSCTVb98juHGiVGPVrgERAPfljP9jYcf8nhGhYAa9KNp++mjfP5/4Q FJnNX4o5A/YvommevgB2A5+c8GKngFaFoUdt6old58m4yTNGEFX4VtLB6JsF6/cu5l3uY2sSyAp/v Yncy0T4Txz3QIjwpw+mw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihy38-0000Fm-HE; Thu, 19 Dec 2019 15:49:14 +0000 Received: from mail-vs1-xe41.google.com ([2607:f8b0:4864:20::e41]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ihy2t-0008Ti-9h for linux-arm-kernel@lists.infradead.org; Thu, 19 Dec 2019 15:49:02 +0000 Received: by mail-vs1-xe41.google.com with SMTP id t12so4026467vso.13 for ; Thu, 19 Dec 2019 07:48:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1kaCXRwivzzZ0gDYQMxNb5fZvTKN4Drl/BBA8SeSbvk=; b=eJqmNR4yFeu1cbLSw2uG6FfugRqV5dKrxt2YHM9/D9gMpcABkEbswYB8eSaWcXntOS mbzjrlF4O2WmbzpBXute4ocZBEnBpbzA6iYMkzyKvI+SbBvchcUgGJBf7naGlw0opObr Y46WQiGzBy9SAfjvmPCjmgu7s1paeIAIkRgQj28RQUdH1fEnycR6Ld5+bUHwcj/+yRBT exdptdE4Lz73b68vBf2XsQ6q5pulrH8ik5cIQ78uzWYC7MxBF+XFn7DZND19tlp2/pXx S14ROpwyoKDClO+2CXDOhgR267n7rlVXK8wIkviSg/eYL8mbvcAGMc1ZHbyKQ/FNcKLC XbqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1kaCXRwivzzZ0gDYQMxNb5fZvTKN4Drl/BBA8SeSbvk=; b=j5ymPKLIKWIK3F58JRaTqR0nqZt7OrURcbJrQXHyWzC+tTO3v9bfA4xXiBDmePIoUo fj4Ppy1FDackV9nIUYho3RqAP6ZIrIXC40sNCUCqgaEAAgTJ+hQtYU2TVSojA66zWlQF NAMt84CO8HAzWr3IlqZTEJTp26sg/FQtc+CC+r0P3EZNVy4ww7lX+YBp4ijQRZ68L4Yl 3d7IqEtFSA0dj4+Tlw/pa16RqtxdQA6pco+LOE0u0fKxlxx8c8v7pCpTfajjOwPGCHh3 4ofv9dO/JiU0d1z/3iK+Yr5jH6ds25gzYaJfLuiNsEHSuRCoBpFVukmyJAWmSn/4D2LU 0ioQ== X-Gm-Message-State: APjAAAXigXBKhmf88yW66grN5Oe2BJt1/7Ucg1XiXOqFwYKLOUQ6+RnL J9ucba0sdufNGy6q1929FubBK2yVEKpHt8grq/i4gg== X-Google-Smtp-Source: APXvYqyEHXTOiaWT64UHyDsh1e5xkHNXkp6qXSMXSPXq6knbbWfOcCv0hWw8oxuY1uMAA0t2E6RRJdBwf/IgoNOzarc= X-Received: by 2002:a67:f499:: with SMTP id o25mr5245791vsn.165.1576770537822; Thu, 19 Dec 2019 07:48:57 -0800 (PST) MIME-Version: 1.0 References: <20191211154343.29765-1-ulf.hansson@linaro.org> <20191211154343.29765-13-ulf.hansson@linaro.org> <20191219143340.GE20746@bogus> In-Reply-To: <20191219143340.GE20746@bogus> From: Ulf Hansson Date: Thu, 19 Dec 2019 16:48:21 +0100 Message-ID: Subject: Re: [PATCH v4 12/14] cpuidle: psci: Support CPU hotplug for the hierarchical model To: Sudeep Holla X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191219_074859_396532_3320F53B X-CRM114-Status: GOOD ( 20.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Lorenzo Pieralisi , Linux PM , Stephen Boyd , linux-arm-msm , Daniel Lezcano , "Rafael J . Wysocki" , Andy Gross , Lina Iyer , Bjorn Andersson , Kevin Hilman , Rob Herring , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 19 Dec 2019 at 15:33, Sudeep Holla wrote: > > On Wed, Dec 11, 2019 at 04:43:41PM +0100, Ulf Hansson wrote: > > When the hierarchical CPU topology is used and when a CPU is put offline, > > that CPU prevents its PM domain from being powered off, which is because > > genpd observes the corresponding attached device as being active from a > > runtime PM point of view. Furthermore, any potential master PM domains are > > also prevented from being powered off. > > > > To address this limitation, let's add add a new CPU hotplug state > > (CPUHP_AP_CPU_PM_STARTING) and register up/down callbacks for it, which > > allows us to deal with runtime PM accordingly. > > > > Signed-off-by: Ulf Hansson > > --- > > > > Changes in v4: > > - Folded in the patch to be part of the series. > > - Rebased on top of earlier changes. > > > > --- > > drivers/cpuidle/cpuidle-psci.c | 45 +++++++++++++++++++++++++++++++++- > > include/linux/cpuhotplug.h | 1 + > > 2 files changed, 45 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/cpuidle/cpuidle-psci.c b/drivers/cpuidle/cpuidle-psci.c > > index 6e7804e697ed..34a89d99bb0f 100644 > > --- a/drivers/cpuidle/cpuidle-psci.c > > +++ b/drivers/cpuidle/cpuidle-psci.c > > @@ -8,6 +8,7 @@ > > > > #define pr_fmt(fmt) "CPUidle PSCI: " fmt > > > > +#include > > #include > > #include > > #include > > @@ -31,6 +32,7 @@ struct psci_cpuidle_data { > > > > static DEFINE_PER_CPU_READ_MOSTLY(struct psci_cpuidle_data, psci_cpuidle_data); > > static DEFINE_PER_CPU(u32, domain_state); > > +static bool psci_cpuidle_use_cpuhp; > > > > [...] > > > + > > +static void psci_idle_init_cpuhp(void) > > +{ > > Can this be made __init along with the boolean psci_cpuidle_use_cpuhp ? Yeah, make sense! > > With that, > Reviewed-by: Sudeep Holla Thanks! Kind regards Uffe _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel