Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp329138ybi; Fri, 7 Jun 2019 08:43:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxYFBrQ0a2R1C2+6vcF8Acxa5LcYxOpYJjyBGkqYwVmH1R7zZFDzVgc0DfD+UbVwBucRKSy X-Received: by 2002:a17:90a:658b:: with SMTP id k11mr6273869pjj.44.1559922203234; Fri, 07 Jun 2019 08:43:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559922203; cv=none; d=google.com; s=arc-20160816; b=yayE7ilhBhDewljM4q+0UwSumt6vQI2W/qhjFKFarZ7rs8nABpm6zv1YlMp1EtrWrd vSbAI0Qi8F6Yj71dnJRsaRavfP8Dcbmn1TU14oOVXp8m1epUa5yUZf0BnQe8m5GG+0oA 9ZtRCRKhAfmqmrnxkQeoNSze79a0g14yD48seRPKFJ8RId1SkdgRNFTqaEixkOclGa7Q ntERgtktaOGcchBzhSnUYQAd6Z8TxXOzDn4H6JjVxodWT/efnHewURbPvJiDoED7ZOAe zDZ+YxvoeDiHH/WDeC4AzWLnx1tEbDnz7dB8ZiKaCSzVogiybsbkwQRupyVPxjju6o1d tPBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=nVS44dN679HP+iSL0gSxkk0KtRwLmrWM9SXNf7tiBeY=; b=dCksNKJQYrpc8zkfiRh+1LvWG0Shjt6gie3fZHdtYchm03pKXdpMZj3Mlk4a64Lcb1 12kaCKVtPn+yCxN7nAVihA9UxGMGKCS8pboLmek1Rdm+5XfgJKiuaMZWI9ctfkWPtrnJ iUYLZXtiFQ9vpyGiuKmqxNe0aFcmLgTHdnhTxY06rGm3sYo8zt8gDbLE72MFk2Vxnnim ftJpg++DVl6v9i3pWigxGLwKnndS4MeZOJ3e+v/3FVjUZ2y4cyK62tb/wbtzzfvo5/3U pjjdD6AXFPPL0DN+TYdDMuLdlJthrFLCFAqZDKpoXG3NzUk+61qpFArMAHMjotANRoFN /2Yg== ARC-Authentication-Results: i=1; mx.google.com; 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 a11si2036467pgh.564.2019.06.07.08.43.05; Fri, 07 Jun 2019 08:43:23 -0700 (PDT) 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; 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 S1729946AbfFGPbV (ORCPT + 99 others); Fri, 7 Jun 2019 11:31:21 -0400 Received: from foss.arm.com ([217.140.110.172]:42804 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729293AbfFGPbT (ORCPT ); Fri, 7 Jun 2019 11:31:19 -0400 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 069B2499; Fri, 7 Jun 2019 08:31:19 -0700 (PDT) Received: from e107155-lin (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 55FE43F718; Fri, 7 Jun 2019 08:31:16 -0700 (PDT) Date: Fri, 7 Jun 2019 16:31:14 +0100 From: Sudeep Holla To: Ulf Hansson Cc: Lorenzo Pieralisi , Mark Rutland , linux-arm-kernel@lists.infradead.org, "Rafael J . Wysocki" , Daniel Lezcano , "Raju P . L . S . S . S . N" , Amit Kucheria , Bjorn Andersson , Stephen Boyd , Niklas Cassel , Tony Lindgren , Kevin Hilman , Lina Iyer , Viresh Kumar , Vincent Guittot , Geert Uytterhoeven , Souvik Chakravarty , Sudeep Holla , linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 15/18] drivers: firmware: psci: Support CPU hotplug for the hierarchical model Message-ID: <20190607153114.GI15577@e107155-lin> References: <20190513192300.653-1-ulf.hansson@linaro.org> <20190513192300.653-16-ulf.hansson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190513192300.653-16-ulf.hansson@linaro.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 13, 2019 at 09:22:57PM +0200, Ulf Hansson wrote: > When the hierarchical CPU topology is used and when a CPU has been put > offline (hotplug), that same CPU prevents its PM domain and thus also > potential master PM domains, from being powered off. This is because genpd > observes the CPU's attached device as being active from a runtime PM point > of view. > > To deal with this, let's decrease the runtime PM usage count by calling > pm_runtime_put_sync_suspend() of the attached struct device when putting > the CPU offline. Consequentially, we must then increase the runtime PM > usage count, while putting the CPU online again. > Why is this firmware/driver specific ? Why can't this be dealt in core pm-domain ? I am concerned that if any other architectures or firmware method decides to use this feature, this need to be duplicated there. The way I see this is pure reference counting and is hardware/firmware/ driver agnostic and can be made generic. -- Regards, Sudeep