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.2 required=3.0 tests=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 E72B4C432C0 for ; Thu, 28 Nov 2019 14:15:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C56B8215A5 for ; Thu, 28 Nov 2019 14:15:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726448AbfK1OPD (ORCPT ); Thu, 28 Nov 2019 09:15:03 -0500 Received: from foss.arm.com ([217.140.110.172]:36000 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726401AbfK1OPD (ORCPT ); Thu, 28 Nov 2019 09:15:03 -0500 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 55E0530E; Thu, 28 Nov 2019 06:15:02 -0800 (PST) Received: from e121166-lin.cambridge.arm.com (e121166-lin.cambridge.arm.com [10.1.196.255]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6E4643F68E; Thu, 28 Nov 2019 06:15:00 -0800 (PST) Date: Thu, 28 Nov 2019 14:14:51 +0000 From: Lorenzo Pieralisi To: Ulf Hansson Cc: Sudeep Holla , Rob Herring , linux-pm@vger.kernel.org, "Rafael J . Wysocki" , Daniel Lezcano , Mark Rutland , Lina Iyer , Vincent Guittot , Stephen Boyd , Andy Gross , Bjorn Andersson , Kevin Hilman , linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v3 08/13] cpuidle: psci: Add a helper to attach a CPU to its PM domain Message-ID: <20191128141443.GA31123@e121166-lin.cambridge.arm.com> References: <20191127102914.18729-1-ulf.hansson@linaro.org> <20191127102914.18729-9-ulf.hansson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191127102914.18729-9-ulf.hansson@linaro.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Wed, Nov 27, 2019 at 11:29:09AM +0100, Ulf Hansson wrote: [...] > +struct device *psci_dt_attach_cpu(int cpu) > +{ > + struct device *dev; > + > + /* Currently limit the hierarchical topology to be used in OSI mode. */ > + if (!psci_has_osi_support()) > + return NULL; > + > + dev = dev_pm_domain_attach_by_name(get_cpu_device(cpu), "psci"); > + if (IS_ERR_OR_NULL(dev)) > + return dev; > + > + pm_runtime_irq_safe(dev); > + if (cpu_online(cpu)) It is unclear to me how we handle (or rather we don't) CPU hotplug with this series - it does not look OK unless genpd code manages that automatically. Lorenzo