From nobody Thu Feb 12 23:17:23 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 447A619DF6F; Thu, 6 Jun 2024 14:18:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717683500; cv=none; b=JRNTew2bWXEY4Ky+jcawWSAQj8tpsyrp9Jr0qSvX56u45wjEnwBn/ecUoZVpOS0rmOr/G4ymmA4ZJ0/5pqGnoSVvMSoAJ87XcqZ/tRtuVX5u/BKAynr1SrrXYwcARdFpUH/mZcqJRL8aWPiXPScm6xSdb4RFoZLtI2QmdECsPUU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717683500; c=relaxed/simple; bh=M5gtKgRr3pW2i5ve7nNgNBEp5DtVGKZwRoP6Dv/xfwM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=iawOW4DLzOYbkaOP1WLKlIAyjraz5p6VV28q99jI7vtSeIfPMLTDX+EE3vGT6gPbvaxc4LeCPkiGZ2lRK4B6+HiBcbS+u45jPt0k6fZIp079YN7NRUNn8eKxzm27ZQLR6Juh29mEBgxUiDNm4nOCrovU82nzUHkuxKR0KX3cph8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=cB6GzN6H; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="cB6GzN6H" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17F9CC2BD10; Thu, 6 Jun 2024 14:18:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1717683500; bh=M5gtKgRr3pW2i5ve7nNgNBEp5DtVGKZwRoP6Dv/xfwM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cB6GzN6HOt8pZAWXHBhLb7T16BLWgYCreWDnk3vgodL9RWGg2bfp5jgtjA0Gp6viZ OxnCM1UKLR8xHsBPcnq9tg8bE/xQBezj+cLp5/LBIxbrCqiQTTLWfl1wDGciW0cg8J LvBzpbVHk8HwW3+F1yyhCxjgYtyhOIlY6VrDizps= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , "Rafael J. Wysocki" , Len Brown , Suzuki K Poulose , Mike Leach , James Clark , Leo Yan , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, coresight@lists.linaro.org, Anshuman Khandual , Sasha Levin Subject: [PATCH 6.6 442/744] coresight: etm4x: Fix unbalanced pm_runtime_enable() Date: Thu, 6 Jun 2024 16:01:54 +0200 Message-ID: <20240606131746.671142501@linuxfoundation.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240606131732.440653204@linuxfoundation.org> References: <20240606131732.440653204@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 6.6-stable review patch. If anyone has any objections, please let me know. Reviewed-by: James Clark ------------------ From: Anshuman Khandual [ Upstream commit caa41c47dab7e1054f587e592ab21296e3a6781c ] 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 Cc: Hanjun Guo Cc: Sudeep Holla Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Suzuki K Poulose Cc: Mike Leach Cc: James Clark Cc: Leo Yan 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 Signed-off-by: Anshuman Khandual Signed-off-by: Suzuki K Poulose Link: https://lore.kernel.org/r/20240314055843.2625883-2-anshuman.khandual@= arm.com Signed-off-by: Sasha Levin --- 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/h= wtracing/coresight/coresight-etm4x-core.c index 18c4544f60454..003245a791a23 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -2175,6 +2175,9 @@ static int etm4_probe_platform_dev(struct platform_de= vice *pdev) ret =3D etm4_probe(&pdev->dev); =20 pm_runtime_put(&pdev->dev); + if (ret) + pm_runtime_disable(&pdev->dev); + return ret; } =20 --=20 2.43.0