Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp743062imu; Fri, 11 Jan 2019 08:18:22 -0800 (PST) X-Google-Smtp-Source: ALg8bN4zvl9yudF3psrjTsPYOt9qOkOw4+G89ZNwAvlX6OYu0AlK3uhM8QqcNagto+nuckq1VQiU X-Received: by 2002:a17:902:64c1:: with SMTP id y1mr15123661pli.64.1547223502857; Fri, 11 Jan 2019 08:18:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547223502; cv=none; d=google.com; s=arc-20160816; b=WPr5SzH0h8W+7i4JVBuFukzqsGf7edM4PzIK/4QbRBSZC+DMqAN47MAT9H7ajWo9FP oyMpOFnRicQde9Su3Jz4ioEiuh3pI79sWHW/Gq5qkD8L0HXJ7LlVtMzay1psC7hbc5cq 9u0zbgpeST/E5cCb9kjvdsMXBufYt7Wpavnoo/dn7nr4DyMvnz/88lzbMPl8htXLGrEa d1uVyCUXamhfZiKuYZRdN27nfwX0lAtELFEcybScjVY6ph9PKa2ydTRCbU875+j/+SEi iVdViu4SL5RTNXwUz8BW5WwBa3oMOYVc+GauFqr7Lblmzwp0scyVc2Caefx+MsZN1sGs K3kA== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=JpZf3lVQKZN51fQeCaugVEFqH6cOaN3eaELTjhPPSfk=; b=YXx69lcVUFf0LXYzoiAk9Rd3vqldjOL846Gd5fcSQ/TZgFGoPVTAT67GWv2zhiXdIr 2rGy6yfqBD6hBivsa1bLadgAGNyfGhzbS9M/Wy74gDI0Ypx1UoTndxFP1vkQ7xWWzD7O 1quj+Rs/WQzsQToLVKMhS8pl5usc9AdSIF/EFFX6kJqI1pSbZUNkdRQ9ycae29M9k+QA e/q78JKdmXwu4SnmvwZLaH6x4bAGd5fpzTkG8ADiseCzGIpnEtxTJ66S6RVYzG0OEP9h cXGzZDADrveMOX0B18INEsrI59hW8v7F4Ctr85uzpp+ljBDqC8wWu/OMHlJ///p/iTkM D/SA== 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 f34si4905527pgm.318.2019.01.11.08.18.07; Fri, 11 Jan 2019 08:18:22 -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; 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 S1729800AbfAKLJV (ORCPT + 99 others); Fri, 11 Jan 2019 06:09:21 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:51645 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725801AbfAKLJV (ORCPT ); Fri, 11 Jan 2019 06:09:21 -0500 Received: from 79.184.254.168.ipv4.supernova.orange.pl (79.184.254.168) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.183) id 0a8fb58d82abfe8c; Fri, 11 Jan 2019 12:09:19 +0100 From: "Rafael J. Wysocki" To: Ulf Hansson Cc: Sudeep Holla , Lorenzo Pieralisi , Mark Rutland , Linux PM , "Raju P . L . S . S . S . N" , Stephen Boyd , Tony Lindgren , Kevin Hilman , Lina Iyer , Viresh Kumar , Vincent Guittot , Geert Uytterhoeven , Linux ARM , linux-arm-msm , Daniel Lezcano , Linux Kernel Mailing List Subject: Re: [PATCH v10 00/27] PM / Domains: Support hierarchical CPU arrangement (PSCI/ARM) Date: Fri, 11 Jan 2019 12:08:32 +0100 Message-ID: <2260944.bWjCqvLuxn@aspire.rjw.lan> In-Reply-To: References: <20181129174700.16585-1-ulf.hansson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, December 17, 2018 5:12:54 PM CET Ulf Hansson wrote: > Rafael, Sudeep, Lorenzo, Mark, > > On Thu, 29 Nov 2018 at 18:47, Ulf Hansson wrote: > > > > Over the years this series have been iterated and discussed at various Linux > > conferences and LKML. In this new v10, a quite significant amount of changes > > have been made to address comments from v8 and v9. A summary is available > > below, although let's start with a brand new clarification of the motivation > > behind this series. > > > > For ARM64/ARM based platforms CPUs are often arranged in a hierarchical manner. > > From a CPU idle state perspective, this means some states may be shared among a > > group of CPUs (aka CPU cluster). > > > > To deal with idle management of a group of CPUs, sometimes the kernel needs to > > be involved to manage the last-man standing algorithm, simply because it can't > > rely solely on power management FWs to deal with this. Depending on the > > platform, of course. > > > > There are a couple of typical scenarios for when the kernel needs to be in > > control, dealing with synchronization of when the last CPU in a cluster is about > > to enter a deep idle state. > > > > 1) > > The kernel needs to carry out so called last-man activities before the > > CPU cluster can enter a deep idle state. This may for example involve to > > configure external logics for wakeups, as the GIC may no longer be functional > > once a deep cluster idle state have been entered. Likewise, these operations > > may need to be restored, when the first CPU wakes up. > > > > 2) > > Other more generic I/O devices, such as an MMC controller for example, may be a > > part of the same power domain as the CPU cluster, due to a shared power-rail. > > For these scenarios, when the MMC controller is in use dealing with an MMC > > request, a deeper idle state of the CPU cluster may needs to be temporarily > > disabled. This is needed to retain the MMC controller in a functional state, > > else it may loose its register-context in the middle of serving a request. > > > > In this series, we are extending the generic PM domain (aka genpd) to be used > > for also CPU devices. Hence the goal is to re-use much of its current code to > > help us manage the last-man standing synchronization. Moreover, as we already > > use genpd to model power domains for generic I/O devices, both 1) and 2) can be > > address with its help. > > > > Moreover, to address these problems for ARM64 DT based platforms, we are > > deploying support for genpd and runtime PM to the PSCI FW driver - and finally > > we make some updates to two ARM64 DTBs, as to deploy the new PSCI CPU topology > > layout. > > > > The series has been tested on the QCOM 410c dragonboard and the Hisilicon Hikey > > board. You may also find the code at: > > > > git.linaro.org/people/ulf.hansson/linux-pm.git next > > It's soon been three weeks since I posted this and I would really > appreciate some feedback. > > Rafael, I need your feedback on patch 1->4. Sorry for the delay, I've replied to the patches. The bottom line is that the mechanism introduced in patch 3 and used in patch 4 doesn't look particularly clean to me. Cheers, Rafael