From: Anshuman Khandual <anshuman.khandual@arm.com> To: linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com Cc: Anshuman Khandual <anshuman.khandual@arm.com>, Lorenzo Pieralisi <lpieralisi@kernel.org>, Sudeep Holla <sudeep.holla@arm.com>, Mike Leach <mike.leach@linaro.org>, James Clark <james.clark@arm.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-stm32@st-md-mailman.stormreply.com, Hanjun Guo <guohanjun@huawei.com>, "Rafael J. Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org>, Leo Yan <leo.yan@linaro.org> Subject: [PATCH V6 01/11] coresight: etm4x: Fix unbalanced pm_runtime_enable() Date: Tue, 12 Mar 2024 15:53:08 +0530 [thread overview] Message-ID: <20240312102318.2285165-2-anshuman.khandual@arm.com> (raw) In-Reply-To: <20240312102318.2285165-1-anshuman.khandual@arm.com> There is an unbalanced pm_runtime_enable() in etm4_probe_platform_dev() when etm4_probe() fails. This problem can be observed via the coresight etm4 module's (load -> unload -> load) sequence when etm4_probe() fails in etm4_probe_platform_dev(). [ 63.379943] coresight-etm4x 7040000.etm: Unbalanced pm_runtime_enable! [ 63.393630] coresight-etm4x 7140000.etm: Unbalanced pm_runtime_enable! [ 63.407455] coresight-etm4x 7240000.etm: Unbalanced pm_runtime_enable! [ 63.420983] coresight-etm4x 7340000.etm: Unbalanced pm_runtime_enable! [ 63.420999] coresight-etm4x 7440000.etm: Unbalanced pm_runtime_enable! [ 63.441209] coresight-etm4x 7540000.etm: Unbalanced pm_runtime_enable! [ 63.454689] coresight-etm4x 7640000.etm: Unbalanced pm_runtime_enable! [ 63.474982] coresight-etm4x 7740000.etm: Unbalanced pm_runtime_enable! This fixes the above problem - with an explicit pm_runtime_disable() call when etm4_probe() fails during etm4_probe_platform_dev(). Cc: Lorenzo Pieralisi <lpieralisi@kernel.org> Cc: Hanjun Guo <guohanjun@huawei.com> Cc: Sudeep Holla <sudeep.holla@arm.com> Cc: "Rafael J. Wysocki" <rafael@kernel.org> Cc: Len Brown <lenb@kernel.org> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Cc: Mike Leach <mike.leach@linaro.org> Cc: James Clark <james.clark@arm.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: linux-acpi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: coresight@lists.linaro.org Fixes: 5214b563588e ("coresight: etm4x: Add support for sysreg only devices") Reviewed-by: James Clark <james.clark@arm.com> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c index c2ca4a02dfce..06a9b94b8c13 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -2213,6 +2213,9 @@ static int etm4_probe_platform_dev(struct platform_device *pdev) ret = etm4_probe(&pdev->dev); pm_runtime_put(&pdev->dev); + if (ret) + pm_runtime_disable(&pdev->dev); + return ret; } -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: Anshuman Khandual <anshuman.khandual@arm.com> To: linux-arm-kernel@lists.infradead.org, suzuki.poulose@arm.com Cc: Anshuman Khandual <anshuman.khandual@arm.com>, Lorenzo Pieralisi <lpieralisi@kernel.org>, Sudeep Holla <sudeep.holla@arm.com>, Mike Leach <mike.leach@linaro.org>, James Clark <james.clark@arm.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@foss.st.com>, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, linux-stm32@st-md-mailman.stormreply.com, Hanjun Guo <guohanjun@huawei.com>, "Rafael J. Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org>, Leo Yan <leo.yan@linaro.org> Subject: [PATCH V6 01/11] coresight: etm4x: Fix unbalanced pm_runtime_enable() Date: Tue, 12 Mar 2024 15:53:08 +0530 [thread overview] Message-ID: <20240312102318.2285165-2-anshuman.khandual@arm.com> (raw) In-Reply-To: <20240312102318.2285165-1-anshuman.khandual@arm.com> There is an unbalanced pm_runtime_enable() in etm4_probe_platform_dev() when etm4_probe() fails. This problem can be observed via the coresight etm4 module's (load -> unload -> load) sequence when etm4_probe() fails in etm4_probe_platform_dev(). [ 63.379943] coresight-etm4x 7040000.etm: Unbalanced pm_runtime_enable! [ 63.393630] coresight-etm4x 7140000.etm: Unbalanced pm_runtime_enable! [ 63.407455] coresight-etm4x 7240000.etm: Unbalanced pm_runtime_enable! [ 63.420983] coresight-etm4x 7340000.etm: Unbalanced pm_runtime_enable! [ 63.420999] coresight-etm4x 7440000.etm: Unbalanced pm_runtime_enable! [ 63.441209] coresight-etm4x 7540000.etm: Unbalanced pm_runtime_enable! [ 63.454689] coresight-etm4x 7640000.etm: Unbalanced pm_runtime_enable! [ 63.474982] coresight-etm4x 7740000.etm: Unbalanced pm_runtime_enable! This fixes the above problem - with an explicit pm_runtime_disable() call when etm4_probe() fails during etm4_probe_platform_dev(). Cc: Lorenzo Pieralisi <lpieralisi@kernel.org> Cc: Hanjun Guo <guohanjun@huawei.com> Cc: Sudeep Holla <sudeep.holla@arm.com> Cc: "Rafael J. Wysocki" <rafael@kernel.org> Cc: Len Brown <lenb@kernel.org> Cc: Suzuki K Poulose <suzuki.poulose@arm.com> Cc: Mike Leach <mike.leach@linaro.org> Cc: James Clark <james.clark@arm.com> Cc: Leo Yan <leo.yan@linaro.org> Cc: linux-acpi@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: coresight@lists.linaro.org Fixes: 5214b563588e ("coresight: etm4x: Add support for sysreg only devices") Reviewed-by: James Clark <james.clark@arm.com> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com> --- drivers/hwtracing/coresight/coresight-etm4x-core.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c index c2ca4a02dfce..06a9b94b8c13 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -2213,6 +2213,9 @@ static int etm4_probe_platform_dev(struct platform_device *pdev) ret = etm4_probe(&pdev->dev); pm_runtime_put(&pdev->dev); + if (ret) + pm_runtime_disable(&pdev->dev); + return ret; } -- 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:[~2024-03-12 10:23 UTC|newest] Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-03-12 10:23 [PATCH V6 00/11] coresight: Move remaining AMBA ACPI devices into platform driver Anshuman Khandual 2024-03-12 10:23 ` Anshuman Khandual 2024-03-12 10:23 ` Anshuman Khandual [this message] 2024-03-12 10:23 ` [PATCH V6 01/11] coresight: etm4x: Fix unbalanced pm_runtime_enable() Anshuman Khandual 2024-03-12 10:23 ` [PATCH V6 02/11] coresight: stm: Extract device name from AMBA pid based table lookup Anshuman Khandual 2024-03-12 10:23 ` Anshuman Khandual 2024-03-12 10:23 ` [PATCH V6 03/11] coresight: tmc: Extract device properties " Anshuman Khandual 2024-03-12 10:23 ` Anshuman Khandual 2024-03-12 10:23 ` [PATCH V6 04/11] coresight: Add helpers registering/removing both AMBA and platform drivers Anshuman Khandual 2024-03-12 10:23 ` Anshuman Khandual 2024-03-12 10:23 ` [PATCH V6 05/11] coresight: replicator: Move ACPI support from AMBA driver to platform driver Anshuman Khandual 2024-03-12 10:23 ` Anshuman Khandual 2024-03-12 14:39 ` Suzuki K Poulose 2024-03-12 14:39 ` Suzuki K Poulose 2024-03-13 2:31 ` Anshuman Khandual 2024-03-13 2:31 ` Anshuman Khandual 2024-03-13 9:41 ` Suzuki K Poulose 2024-03-13 9:41 ` Suzuki K Poulose 2024-03-12 10:23 ` [PATCH V6 06/11] coresight: funnel: " Anshuman Khandual 2024-03-12 10:23 ` Anshuman Khandual 2024-03-12 14:41 ` Suzuki K Poulose 2024-03-12 14:41 ` Suzuki K Poulose 2024-03-13 4:33 ` Anshuman Khandual 2024-03-13 4:33 ` Anshuman Khandual 2024-03-13 11:08 ` Suzuki K Poulose 2024-03-13 11:08 ` Suzuki K Poulose 2024-03-12 10:23 ` [PATCH V6 07/11] coresight: catu: " Anshuman Khandual 2024-03-12 10:23 ` Anshuman Khandual 2024-03-12 15:05 ` Suzuki K Poulose 2024-03-12 15:05 ` Suzuki K Poulose 2024-03-13 4:35 ` Anshuman Khandual 2024-03-13 4:35 ` Anshuman Khandual 2024-03-12 10:23 ` [PATCH V6 08/11] coresight: tpiu: " Anshuman Khandual 2024-03-12 10:23 ` Anshuman Khandual 2024-03-12 16:37 ` Suzuki K Poulose 2024-03-12 16:37 ` Suzuki K Poulose 2024-03-13 4:42 ` Anshuman Khandual 2024-03-13 4:42 ` Anshuman Khandual 2024-03-12 10:23 ` [PATCH V6 09/11] coresight: tmc: " Anshuman Khandual 2024-03-12 10:23 ` Anshuman Khandual 2024-03-12 10:23 ` [PATCH V6 10/11] coresight: stm: " Anshuman Khandual 2024-03-12 10:23 ` Anshuman Khandual 2024-03-12 10:23 ` [PATCH V6 11/11] coresight: debug: " Anshuman Khandual 2024-03-12 10:23 ` Anshuman Khandual
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=20240312102318.2285165-2-anshuman.khandual@arm.com \ --to=anshuman.khandual@arm.com \ --cc=alexandre.torgue@foss.st.com \ --cc=coresight@lists.linaro.org \ --cc=guohanjun@huawei.com \ --cc=james.clark@arm.com \ --cc=lenb@kernel.org \ --cc=leo.yan@linaro.org \ --cc=linux-acpi@vger.kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-stm32@st-md-mailman.stormreply.com \ --cc=lpieralisi@kernel.org \ --cc=mcoquelin.stm32@gmail.com \ --cc=mike.leach@linaro.org \ --cc=rafael@kernel.org \ --cc=sudeep.holla@arm.com \ --cc=suzuki.poulose@arm.com \ /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.