From mboxrd@z Thu Jan 1 00:00:00 1970 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=-14.3 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=ham 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 CEAD2C433DF for ; Tue, 16 Jun 2020 07:06:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A9128208B3 for ; Tue, 16 Jun 2020 07:06:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="hUotNTYX" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726691AbgFPHGS (ORCPT ); Tue, 16 Jun 2020 03:06:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725710AbgFPHGR (ORCPT ); Tue, 16 Jun 2020 03:06:17 -0400 Received: from mail-oo1-xc42.google.com (mail-oo1-xc42.google.com [IPv6:2607:f8b0:4864:20::c42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4EEA9C05BD43 for ; Tue, 16 Jun 2020 00:06:17 -0700 (PDT) Received: by mail-oo1-xc42.google.com with SMTP id k7so3882936ooo.12 for ; Tue, 16 Jun 2020 00:06:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+dWf3nAO7RIVSziG2R8EQ/byF3ECDsm88+AYas5NW7c=; b=hUotNTYXbchN5+ZCIKb2puKz+0Wpr1cYv6v7VWZRr+/1TX1hvM+/cLeVgxvJaWTVRT BK06DsQ5hih6fbisut+zRwvLe0SVJEEQLJpdarfBtBsTnPWYBVGVfTQG0jGX4/uQKvOh iX0R/Nkxv4JPAI9mylZXUMyp8+xdlUCLaplYa424ZmAt9E5Gn2ASlVA1sghIj+RGHePm CedQrJTsqUWf3htF1exEDiTcPB7ZeiNXoRV2m3CoLk5vE0zuog32+8YApbzFY5USxBXV jExuLIvfS1/Wv4mQvm4MU9hP1A++pcpeld8k8jy6D6dxDZDFBeImgNt15ZZPNDtN7F2D iBUw== 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=+dWf3nAO7RIVSziG2R8EQ/byF3ECDsm88+AYas5NW7c=; b=QKprk0pL852JbEpBAB6jKVIclLDkwFFWASIbZ7G/055pupIRZQJxrepjFDedDsAyuK YA0YOIkRmFNQFRv+g/QCVo+7lPwFDKGUic4OpCD2jZqrVoXqrcYeCFTUsIuurWusx2dR IbmXOk2BhQTj6Aj9G3Mxqt+4OwGm/YTFyLsUQvnokkwqLoKbJXcpp28p7arWU0nunuZo 9kg4f1CAzes3AHramfdWeiSq2aT6ZaPnIOPiKnxaZGNWgxQcnVkFchYAczmkXiq/uMaf 3o6sAJYcxYKNkAotK0bU+M9q0Oi1zljWoB80Rti8fCthVh6CRN51txvCiioBpzL7ALcM Y3Cw== X-Gm-Message-State: AOAM530c2iAKIHYqE4rlavcMyqVdf8I3SSBOfyeCik44CbFM2W1BBItw lQOkn5lTMFu4gr+u9T5B8I7vb/BJFx3t+iw7Vo+J8A== X-Google-Smtp-Source: ABdhPJyVCYktZ6V7XSNJTtQEsGKzeWMLHV4XTyT4toPtCAIDWAQGrjSr2pm4XD2vjPGlVkDlDoLj7plcz2bqcFbDg7Q= X-Received: by 2002:a4a:374b:: with SMTP id r72mr1233953oor.15.1592291176234; Tue, 16 Jun 2020 00:06:16 -0700 (PDT) MIME-Version: 1.0 References: <20200615152054.6819-1-ulf.hansson@linaro.org> <20200615152054.6819-6-ulf.hansson@linaro.org> In-Reply-To: From: Saravana Kannan Date: Tue, 16 Jun 2020 00:05:40 -0700 Message-ID: Subject: Re: [PATCH 5/5] cpuidle: psci: Prevent domain idlestates until consumers are ready To: Ulf Hansson Cc: Sudeep Holla , Lorenzo Pieralisi , Linux PM , "Rafael J . Wysocki" , Daniel Lezcano , Lina Iyer , Vincent Guittot , Stephen Boyd , Bjorn Andersson , Benjamin Gaignard , linux-arm-kernel Content-Type: text/plain; charset="UTF-8" Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Mon, Jun 15, 2020 at 11:50 PM Ulf Hansson wrote: > > On Mon, 15 Jun 2020 at 20:06, Saravana Kannan wrote: > > > > On Mon, Jun 15, 2020 at 8:21 AM Ulf Hansson wrote: > > > > > > Depending on the SoC/platform, additional devices may be part of the PSCI > > > PM domain topology. This is the case with 'qcom,rpmh-rsc' device, for > > > example, even if this is not yet visible in the corresponding DTS-files. > > > > > > Without going into too much details, a device like the 'qcom,rpmh-rsc' may > > > have HW constraints that needs to be obeyed to, before a domain idlestate > > > can be picked. > > > > > > Therefore, let's implement the ->sync_state() callback to receive a > > > notification when all consumers of the PSCI PM domain providers have been > > > attached/probed to it. In this way, we can make sure all constraints from > > > all relevant devices, are taken into account before allowing a domain > > > idlestate to be picked. > > > > > > Signed-off-by: Ulf Hansson > > > --- > > > drivers/cpuidle/cpuidle-psci-domain.c | 14 ++++++++++++++ > > > 1 file changed, 14 insertions(+) > > > > > > diff --git a/drivers/cpuidle/cpuidle-psci-domain.c b/drivers/cpuidle/cpuidle-psci-domain.c > > > index bf527d2bb4b6..b6e9649ab0da 100644 > > > --- a/drivers/cpuidle/cpuidle-psci-domain.c > > > +++ b/drivers/cpuidle/cpuidle-psci-domain.c > > > @@ -27,6 +27,7 @@ struct psci_pd_provider { > > > }; > > > > > > static LIST_HEAD(psci_pd_providers); > > > +static bool psci_pd_allow_domain_state; > > > > Is there ever only 1 device that's probed by this driver? If yes, this > > is okay. Otherwise, you'll need to handle this on a per device basis. > > There is only one device. Subnodes, may exist to describe a > hierarchical description of the topology of the power-domains [1]. Thanks. In that case: Acked-by: Saravana Kannan -Saravana