From: Ulf Hansson <ulf.hansson@linaro.org> To: "Rafael J . Wysocki" <rafael@kernel.org>, linux-pm@vger.kernel.org Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>, Geert Uytterhoeven <geert+renesas@glider.be>, Maulik Shah <quic_mkshah@quicinc.com>, Gabriel Fernandez <gabriel.fernandez@foss.st.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Dmitry Osipenko <digetx@gmail.com>, Kevin Hilman <khilman@kernel.org>, Ulf Hansson <ulf.hansson@linaro.org>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/14] PM: domains: Fixup QoS latency measurements for IRQ safe devices in genpd Date: Wed, 11 May 2022 16:56:59 +0200 [thread overview] Message-ID: <20220511145704.698189-10-ulf.hansson@linaro.org> (raw) In-Reply-To: <20220511145704.698189-1-ulf.hansson@linaro.org> When an IRQ safe device is attached to a non-IRQ safe PM domain, genpd needs to prevent the PM domain from being powered off. However, genpd still allows the device to be runtime suspended/resumed, hence it's also reasonable to think that a governor may be used to validate the QoS latency constraints. Unfortunately, genpd_runtime_resume() treats the configuration above, as a reason to skip measuring the QoS resume latency for the device. This is a legacy behaviour that was earlier correct, but should have been changed when genpd was transformed into its current behaviour around how it manages IRQ safe devices. Luckily, there's no report about problems, so let's just fixup the behaviour. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> --- drivers/base/power/domain.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 2cdfbe48dde0..48101232fcb9 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -970,10 +970,8 @@ static int genpd_runtime_resume(struct device *dev) * As we don't power off a non IRQ safe domain, which holds * an IRQ safe device, we don't need to restore power to it. */ - if (irq_safe_dev_in_sleep_domain(dev, genpd)) { - timed = false; + if (irq_safe_dev_in_sleep_domain(dev, genpd)) goto out; - } genpd_lock(genpd); ret = genpd_power_on(genpd, 0); -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Ulf Hansson <ulf.hansson@linaro.org> To: "Rafael J . Wysocki" <rafael@kernel.org>, linux-pm@vger.kernel.org Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>, Geert Uytterhoeven <geert+renesas@glider.be>, Maulik Shah <quic_mkshah@quicinc.com>, Gabriel Fernandez <gabriel.fernandez@foss.st.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Dmitry Osipenko <digetx@gmail.com>, Kevin Hilman <khilman@kernel.org>, Ulf Hansson <ulf.hansson@linaro.org>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/14] PM: domains: Fixup QoS latency measurements for IRQ safe devices in genpd Date: Wed, 11 May 2022 16:56:59 +0200 [thread overview] Message-ID: <20220511145704.698189-10-ulf.hansson@linaro.org> (raw) In-Reply-To: <20220511145704.698189-1-ulf.hansson@linaro.org> When an IRQ safe device is attached to a non-IRQ safe PM domain, genpd needs to prevent the PM domain from being powered off. However, genpd still allows the device to be runtime suspended/resumed, hence it's also reasonable to think that a governor may be used to validate the QoS latency constraints. Unfortunately, genpd_runtime_resume() treats the configuration above, as a reason to skip measuring the QoS resume latency for the device. This is a legacy behaviour that was earlier correct, but should have been changed when genpd was transformed into its current behaviour around how it manages IRQ safe devices. Luckily, there's no report about problems, so let's just fixup the behaviour. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> --- drivers/base/power/domain.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 2cdfbe48dde0..48101232fcb9 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -970,10 +970,8 @@ static int genpd_runtime_resume(struct device *dev) * As we don't power off a non IRQ safe domain, which holds * an IRQ safe device, we don't need to restore power to it. */ - if (irq_safe_dev_in_sleep_domain(dev, genpd)) { - timed = false; + if (irq_safe_dev_in_sleep_domain(dev, genpd)) goto out; - } genpd_lock(genpd); ret = genpd_power_on(genpd, 0); -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-05-11 14:58 UTC|newest] Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-11 14:56 [PATCH 00/14] PM: domains: Various improvements for genpd Ulf Hansson 2022-05-11 14:56 ` Ulf Hansson 2022-05-11 14:56 ` [PATCH 01/14] PM: domains: Add GENPD_FLAG_RPM_ALWAYS_ON for the always-on governor Ulf Hansson 2022-05-11 14:56 ` Ulf Hansson 2022-05-11 14:56 ` [PATCH 02/14] PM: domains: Drop redundant code for genpd " Ulf Hansson 2022-05-11 14:56 ` Ulf Hansson 2022-05-11 14:56 ` [PATCH 03/14] PM: domains: Don't check PM_QOS_FLAG_NO_POWER_OFF in genpd Ulf Hansson 2022-05-11 14:56 ` Ulf Hansson 2022-05-11 14:56 ` [PATCH 04/14] PM: domains: Rename irq_safe_dev_in_no_sleep_domain() " Ulf Hansson 2022-05-11 14:56 ` Ulf Hansson 2022-05-11 14:56 ` [PATCH 05/14] PM: domains: Skip another warning in irq_safe_dev_in_sleep_domain() Ulf Hansson 2022-05-11 14:56 ` Ulf Hansson 2022-05-11 14:56 ` [PATCH 06/14] PM: domains: Allocate gpd_timing_data dynamically based on governor Ulf Hansson 2022-05-11 14:56 ` Ulf Hansson 2022-05-11 14:56 ` [PATCH 07/14] PM: domains: Move the next_wakeup variable into the struct gpd_timing_data Ulf Hansson 2022-05-11 14:56 ` Ulf Hansson 2022-05-11 14:56 ` [PATCH 08/14] PM: domains: Measure suspend/resume latencies in genpd based on governor Ulf Hansson 2022-05-11 14:56 ` Ulf Hansson 2022-05-11 14:56 ` Ulf Hansson [this message] 2022-05-11 14:56 ` [PATCH 09/14] PM: domains: Fixup QoS latency measurements for IRQ safe devices in genpd Ulf Hansson 2022-05-11 14:57 ` [PATCH 10/14] PM: domains: Fix initialization of genpd's next_wakeup Ulf Hansson 2022-05-11 14:57 ` Ulf Hansson 2022-05-11 14:57 ` [PATCH 11/14] PM: domains: Clean up some code in pm_genpd_init() and genpd_remove() Ulf Hansson 2022-05-11 14:57 ` Ulf Hansson 2022-05-11 14:57 ` [PATCH 12/14] PM: domains: Allocate governor data dynamically based on a genpd governor Ulf Hansson 2022-05-11 14:57 ` Ulf Hansson 2022-05-11 14:57 ` [PATCH 13/14] PM: domains: Measure power-on/off latencies in genpd based on a governor Ulf Hansson 2022-05-11 14:57 ` Ulf Hansson 2022-05-11 14:57 ` [PATCH 14/14] PM: domains: Trust domain-idle-states from DT to be correct by genpd Ulf Hansson 2022-05-11 14:57 ` Ulf Hansson 2022-05-19 18:37 ` [PATCH 00/14] PM: domains: Various improvements for genpd Rafael J. Wysocki 2022-05-19 18:37 ` Rafael J. Wysocki
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220511145704.698189-10-ulf.hansson@linaro.org \ --to=ulf.hansson@linaro.org \ --cc=alexandre.torgue@foss.st.com \ --cc=digetx@gmail.com \ --cc=gabriel.fernandez@foss.st.com \ --cc=geert+renesas@glider.be \ --cc=khilman@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-pm@vger.kernel.org \ --cc=quic_mkshah@quicinc.com \ --cc=rafael@kernel.org \ --cc=rjw@rjwysocki.net \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.