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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1DFFC43334 for ; Wed, 29 Jun 2022 04:26:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230200AbiF2E0l (ORCPT ); Wed, 29 Jun 2022 00:26:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229570AbiF2E0k (ORCPT ); Wed, 29 Jun 2022 00:26:40 -0400 Received: from mail-oa1-x36.google.com (mail-oa1-x36.google.com [IPv6:2001:4860:4864:20::36]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 96F8929CA2 for ; Tue, 28 Jun 2022 21:26:39 -0700 (PDT) Received: by mail-oa1-x36.google.com with SMTP id 586e51a60fabf-101bb9275bcso19843798fac.8 for ; Tue, 28 Jun 2022 21:26:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=jnaawprXfmG6ArUjDmhbntHgFsVQlLxhTFgPAPSRwjg=; b=GbfLXMPepyfuSUDoSzl1hEaYhjHaRLXMoCmqqAF3K1GY1DSWqSXmtb//WQyA/ESPeq I6ljc58JDOAwNh6DRqz0RMZp4ezQst5fJ71hkHM8aWBD45yCd4P6xPVYpDGfpBnOxrwW 6jyz+8L5KZb9SRFaVhvY5T0VQYAtlDGKU+ToSkA5w3WdtKVhQosMItn78LsshIYrXHyh yhIDw86IfqVJE2hsc6rb9ZXJqkPwT3nJr2pufzGS8MpwxlbSbOfIZ0cE4NSgOjDLwrxA a5h0gKCmtbpqrXuQGhHu/25uu43bX65zHrmyzZby60eq5fN/oD8kSfb/hcAtwHyv5d4p +XVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=jnaawprXfmG6ArUjDmhbntHgFsVQlLxhTFgPAPSRwjg=; b=W8ZRatWQ6iwtkk4hLIUTs0TwHObCzd8jZKczD/8AFSLUJEgKKLJYYMuGMalhbuFMES f5b+XlgGd+jTUuRC+/VpkIRctAg4LHwlahk+TbrGSmDjzYVwsKvZF78xqlYoHS842UTi AXoD43pDFs6VMPUIGyMTSL/FvBk0rSyWvch0FpTk4x9PNGBagk7maeXXp0N2NyXeEdjU kcwL4gyak9x1fscK/nGF66k3LlxBZ3IwhlTSGsqstcn7W0qJVbZgSLJxImgkDesJxt6f PPwSL9TntKQUEaOJKDPyYwIRBi7Vq8sDE38uyTFjcY7PpmFD9O0AMHaeXn8kRAk36U7Z 6UrQ== X-Gm-Message-State: AJIora/i2LsNrg0bjxhnB9VJ/3ncrPmzppaUzvGwrmbjJ5ela16f5fHa ir7OCvLyz8BXMR2F6CoaV1SGSQ== X-Google-Smtp-Source: AGRyM1s8YqDFd8J2y9RnBg6GTnJfH3L27GZjHUJC+HsVIpRGgrDooAqn71ss6MXkqOJtgPODQqEyhQ== X-Received: by 2002:a05:6871:4599:b0:104:8a0a:acb9 with SMTP id nl25-20020a056871459900b001048a0aacb9mr1805588oab.127.1656476798990; Tue, 28 Jun 2022 21:26:38 -0700 (PDT) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id u5-20020a4a9705000000b0042568efdaccsm8739122ooi.15.2022.06.28.21.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 21:26:38 -0700 (PDT) Date: Tue, 28 Jun 2022 23:26:36 -0500 From: Bjorn Andersson To: Maulik Shah Cc: Ulf Hansson , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, rafael@kernel.org, daniel.lezcano@linaro.org, quic_lsrao@quicinc.com, quic_rjendra@quicinc.com Subject: Re: [PATCH v2 4/6] PM: domains: Store the closest hrtimer event of the domain CPUs Message-ID: References: <1652275016-13423-1-git-send-email-quic_mkshah@quicinc.com> <1652275016-13423-5-git-send-email-quic_mkshah@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Thu 19 May 07:56 CDT 2022, Ulf Hansson wrote: > On Wed, 11 May 2022 at 15:17, Maulik Shah wrote: > > > > The arch timer can not wake up the Qualcomm Technologies, Inc. (QTI) > > SoCs when the deepest CPUidle modes results in the SoC also to enter > > the low power mode. > > > > RSC is part of CPU subsystem and APSS rsc device is attached to cluster > > power domain. RSC has to setup next hrtimer wakeup in CONTROL_TCS which > > can wakeup the SoC from deepest low power states. The CONTROL_TCS does > > this by writing next wakeup in always on domain timer when the SoC is > > entering the low power state. > > > > Add dev_pm_genpd_get_next_hrtimer() to get the genpd wakeup time. > > > > Signed-off-by: Maulik Shah > > --- > > drivers/base/power/domain.c | 24 ++++++++++++++++++++++++ > > drivers/base/power/domain_governor.c | 1 + > > include/linux/pm_domain.h | 7 +++++++ > > 3 files changed, 32 insertions(+) > > > > diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c > > index 18cd796..f0d70d0 100644 > > --- a/drivers/base/power/domain.c > > +++ b/drivers/base/power/domain.c > > @@ -487,6 +487,29 @@ void dev_pm_genpd_set_next_wakeup(struct device *dev, ktime_t next) > > } > > EXPORT_SYMBOL_GPL(dev_pm_genpd_set_next_wakeup); > > > > +/** > > + * dev_pm_genpd_get_next_hrtimer - Return genpd domain next_hrtimer. > > + * > > + * @dev: Device to handle > > + * > > + * Returns the aggregated domain wakeup time for CPU PM domain > > + * when all the subdomains are off. > > To further clarify when this function should be used, I think that we > should state that it should typically be called from a consumer of a > genpd on/off-notifier at GENPD_NOTIFY_PRE_OFF. This also means that > the genpd's lock is being held across the function. > Maulik, it seems the only things remaining for this series it resolve these three comments. Looking forward to be able to merge the next revision. Regards, Bjorn