Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp2113306ybi; Thu, 18 Jul 2019 03:36:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqwgcyLdsaQomWmS9yewADLhhkQcS94eXdcTSnABAJLRAB7S+jGxSGAN65yw5sIRHTRs8XmJ X-Received: by 2002:a63:f452:: with SMTP id p18mr21234961pgk.373.1563446180205; Thu, 18 Jul 2019 03:36:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1563446180; cv=none; d=google.com; s=arc-20160816; b=d0CiDUqeCvmiWp9EIpfnZGWr6E1a5TwXbLuBOoo+QxP8AgTtpPinx1tw+CAmWdceTq dwtpSKhQqz6lRmSJe9v4VZxGqZVdrrY6njTVRAkKEW+pGHCZjhv7C+aB6GkXhgVN3G5M gGZoL7bMVYLlmXlzEpSF3BrI925Nx4GxMSbyRGf6dH9HAXLmXMRmy/qRj8Sgra2dZRTF 93sIVsKdsGvcZBHcE72PKWCo0wA+fMksji6i/R1VO5OQ3lYM6AvtgkFfSpGw25rKcIn3 NtcP5HtxYlf/m3HUeci0hOMjhkE/gOLojz+vgynHQtCq6qqjRbdtKurzr/RZorvogGid z+DA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=bPsZyaY1avB4NmRKihmlAbRWMA/+wWnkWYAQnUJy/uc=; b=jfJLJdHO5hKfDuxZFUD0IWi0pk3F1cQyzGN+C8WjICtp2qA4K1m+ppd9swJ0F4/Vm/ A8jCp/hOYkHCT7EP0r3L2F5af+YC1xn4koaWGIW8xRkckVd3Vl1+I5vEm3wUEP4IDQha 1Oe2ELdg6DhEwZvxEE8kL04oAjT80LAElohDTcP+I12H1AhAI/rrLjzOH3tDEbMC5Sfn bN6thDZJpbACufTdNe6nM4V+zc3FjbamxUcpurSNGJeieyPq/0V2/VvzROAKhVySo7J6 p4bHyLicTRFh2tYTbjqRHMFZe5n+qU/F25ghY5pADxTnYeimoTyIU4dsabpPnWXnvRjb +CKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hRS9tdns; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cf7si15204124plb.435.2019.07.18.03.36.03; Thu, 18 Jul 2019 03:36:20 -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; dkim=pass header.i=@linaro.org header.s=google header.b=hRS9tdns; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389689AbfGRKfp (ORCPT + 99 others); Thu, 18 Jul 2019 06:35:45 -0400 Received: from mail-vs1-f67.google.com ([209.85.217.67]:33684 "EHLO mail-vs1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726715AbfGRKfp (ORCPT ); Thu, 18 Jul 2019 06:35:45 -0400 Received: by mail-vs1-f67.google.com with SMTP id m8so18807134vsj.0 for ; Thu, 18 Jul 2019 03:35:44 -0700 (PDT) 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=bPsZyaY1avB4NmRKihmlAbRWMA/+wWnkWYAQnUJy/uc=; b=hRS9tdns/W1JgD4gXX9suvoW/sEfa10WszlqRMNyTDVGE4pvXMTTfwq/5kkohrxDM7 W7+I5ziWAyIuiHrX/lcoOj0SJw+f5YG4xCubaO4tE70Z+vieiYB4B26jaOQUvlMI4S+U xyN1krAtJQAXe2Vz8klpfFqYJMDNdZ8cfzuW9QcUmMv6R4UjK1Kq/58lPsgA4sCtpTzA 0qFoFw674o5/tuQ1z4FPQeyxpwMSw1+qVsC8O6HgdTQBOqM/uGIyiyS0Pf5HCXETQW4d 5Gyb4/sUE+H9nH3Nb/q1LqBqKoM5Uq2R4rYtA1XYgsHvHKaCOvYtSeHXrL6RULNV1DnO IYpg== 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=bPsZyaY1avB4NmRKihmlAbRWMA/+wWnkWYAQnUJy/uc=; b=VVA4mmvYckGsbdP8DEL2z7+y3DqmFSHjkS3I+Of3q2uWER2AqtPMqoNlmd7Jj/Uisx h/scU236lsxjjs6V19GCiNxkda9xdUbWAo7O4Y1jBfE4q2F4b4js7m4pp3U0y3hJch0P 2EWqP2S6+QOpxps9P3t0+9H/d7UadiyikVF3Ju02OiF5VHGi6VK5HPmVuFuqozlri4IT +QgR0xAhnObtUyKlC3Pza6u63abeb/pUb40CRMAFNDBUZ6J1GkRnIn3wPHNFFh7JsLwm SND50pcxjun+W+IRAbELLWOEsXF6To0+UKRaGTIJlivVz8aaQ+hmD255Eoho58enA8v1 bXoA== X-Gm-Message-State: APjAAAXwLiLdykNm8v0QShcmKEm0unwIfue1ilWN00P01ztxZ4cV5Tql q/QBTyOvMqlLbPJe7K10A+LP1kSvZ0n3zYGWVD1YYw== X-Received: by 2002:a67:ee16:: with SMTP id f22mr28548547vsp.191.1563446144144; Thu, 18 Jul 2019 03:35:44 -0700 (PDT) MIME-Version: 1.0 References: <20190513192300.653-1-ulf.hansson@linaro.org> <20190513192300.653-15-ulf.hansson@linaro.org> <20190716155317.GB32490@e121166-lin.cambridge.arm.com> In-Reply-To: <20190716155317.GB32490@e121166-lin.cambridge.arm.com> From: Ulf Hansson Date: Thu, 18 Jul 2019 12:35:07 +0200 Message-ID: Subject: Re: [PATCH 14/18] drivers: firmware: psci: Manage runtime PM in the idle path for CPUs To: Lorenzo Pieralisi Cc: Sudeep Holla , Mark Rutland , Linux ARM , "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 , Linux PM , linux-arm-msm , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 16 Jul 2019 at 17:53, Lorenzo Pieralisi wrote: > > On Mon, May 13, 2019 at 09:22:56PM +0200, Ulf Hansson wrote: > > When the hierarchical CPU topology layout is used in DT, let's allow the > > CPU to be power managed through its PM domain, via deploying runtime PM > > support. > > > > To know for which idle states runtime PM reference counting is needed, > > let's store the index of deepest idle state for the CPU, in a per CPU > > variable. This allows psci_cpu_suspend_enter() to compare this index with > > the requested idle state index and then act accordingly. > > I do not see why a system with two CPU CPUidle states, say CPU retention > and CPU shutdown, should not be calling runtime PM on CPU retention > entry. If the CPU idle governor did select the CPU retention for the CPU, it was probably because the target residency for the CPU shutdown state could not be met. In this case, there is no point in allowing any other deeper idle states for cluster/package/system, since those have even greater residencies, hence calling runtime PM doesn't make sense. > > The question then is what cluster/package/system states > are allowed for a given CPU idle state, to understand > what idle states can be actually entered at any hierarchy > level given the choice made for the CPU idle state. > > In the case above, a CPU entering retention state should prevent > runtime PM selecting a cluster shutdown state; most likely firmware > would demote the request to cluster retention but still, we should > find a way to describe these dependencies. See above. [...] Kind regards Uffe