Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1038755pxm; Wed, 23 Feb 2022 16:33:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxZy+JLy9thFg7PDta6nGtsCrm0tB6NgERRSCH76vb/S0Ju8m4OVx4o67mdEh7zCeP0gEET X-Received: by 2002:a17:902:a3c6:b0:14f:b4bd:a1d7 with SMTP id q6-20020a170902a3c600b0014fb4bda1d7mr312790plb.173.1645662827175; Wed, 23 Feb 2022 16:33:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645662827; cv=none; d=google.com; s=arc-20160816; b=EkcR0zB7LfzjAQcQO8Axt8idrmNUpfThh2fU+M1zKThYmcLjSY5/A5GG/O42M9S5fo jQaGgHAbpbPhMB3esOpiUlieXLN5CoI3M1LVJ6nH/ByDTg18ffLl+NMAOynSDFIY56C4 3KH+IF6Y2DW0FIVN/JHBIi7IWYhmlpmUvT1r5Qdn9I0Xtq4RKQxKc1z5jUAkFfmfkObx r1wQAoBZXxlIx2tWUP7TD4b9SStayGRNpeSjZLSE7n00pL2t2wch6fxsjWCfgXu5CLO+ xcqTt35nvdzDpeCDxlQtyNSBEeLYS+U2yZ7ar4Y05p8LdRozu7PZxJtdYeDsHpAaYK0v FHDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=YcDeZSIhchlCfyyE7bM6rspFtbmI3+f1+1Jb1Tm1t1c=; b=amOUmcJZGlHNnF8PYAD/3piMClHqFmUI4Mk2hVKl8wllAvvGrn3lNt1T95NH/OWd8t H7pJgHqO3fyzGnsoF+h+cIgW9rcb5MyA6Sih0tU5QAurCjDJ4FGI4k1+dcSuhForkxTs 71H2afUL8D5dn0MDqFQtL1IB3TtlqGFcx0XHaBPfOmYHm0HmjedH+HXxDnRdqyL1ObAG a+PpkP/cT8A0gZWfK9xP31752fQ86D+Kax+iFDCf/HNzrSfvn/tYNSLef4YA6hAWs9K9 MUfH/Nk8bRjV91UPD+s4SdxK7Q2d8yMAF36HADV3KYYEMI9FOSEh0c0KJW6yGhxP6JIE vOGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id o6si1050724pgv.157.2022.02.23.16.33.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Feb 2022 16:33:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A8FEE75E59; Wed, 23 Feb 2022 16:32:56 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240905AbiBWTcQ (ORCPT + 99 others); Wed, 23 Feb 2022 14:32:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237108AbiBWTcP (ORCPT ); Wed, 23 Feb 2022 14:32:15 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 762E46311; Wed, 23 Feb 2022 11:31:42 -0800 (PST) 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 A84B8ED1; Wed, 23 Feb 2022 11:31:42 -0800 (PST) Received: from bogus (unknown [10.57.3.200]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 05E953F66F; Wed, 23 Feb 2022 11:31:39 -0800 (PST) Date: Wed, 23 Feb 2022 19:30:50 +0000 From: Sudeep Holla To: Shawn Guo Cc: Marc Zyngier , "Rafael J . Wysocki" , Valentin Schneider , Sebastian Andrzej Siewior , Sudeep Holla , Thomas Gleixner , Maulik Shah , Bjorn Andersson , Ulf Hansson , Daniel Lezcano , Rob Herring , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v6 1/3] PM: cpu: Add CPU_LAST_PM_ENTER and CPU_FIRST_PM_EXIT support Message-ID: <20220223193050.y7parhlmnspcyom3@bogus> References: <20220223125536.230224-1-shawn.guo@linaro.org> <20220223125536.230224-2-shawn.guo@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220223125536.230224-2-shawn.guo@linaro.org> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 23, 2022 at 08:55:34PM +0800, Shawn Guo wrote: > It becomes a common situation on some platforms that certain hardware > setup needs to be done on the last standing cpu, and rpmh-rsc[1] is such > an existing example. As figuring out the last standing cpu is really > something generic, it adds CPU_LAST_PM_ENTER (and CPU_FIRST_PM_EXIT) > event support to cpu_pm helper, so that individual driver can be > notified when the last standing cpu is about to enter low power state. Sorry for not getting back on the previous email thread. When I meant I didn't want to use CPU_CLUSTER_PM_{ENTER,EXIT}, I wasn't thinking new ones to be added as alternative. With this OSI cpuidle, we have introduces the concept of power domains and I was check if we can associate these requirements to them rather than introducing the first and last cpu notion. The power domains already identify them in order to turn on or off. Not sure if there is any notification mechanism in genpd/power domains. I really don't like this addition. It is disintegrating all the solutions for OSI and makes it hard to understand. One solution I can think of(not sure if others like or if that is feasible) is to create a parent power domain that encloses all the last level CPU power domains, which means when the last one is getting powered off, you will be asked to power off and you can take whatever action you want. -- Regards, Sudeep