lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250512122746.546849-1-quic_zhonhan@quicinc.com>
Date: Mon, 12 May 2025 20:27:46 +0800
From: Zhongqiu Han <quic_zhonhan@...cinc.com>
To: <jani.nikula@...ux.intel.com>, <joonas.lahtinen@...ux.intel.com>,
        <rodrigo.vivi@...el.com>, <tursulin@...ulin.net>, <airlied@...il.com>,
        <simona@...ll.ch>, <chris@...is-wilson.co.uk>
CC: <intel-gfx@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>,
        <linux-kernel@...r.kernel.org>, <quic_zhonhan@...cinc.com>
Subject: [PATCH] drm/i915/vlv: Remove redundant on_each_cpu() call in __vlv_punit_get()

The use of on_each_cpu() with a no-op callback in __vlv_punit_get() was a
conservative safeguard to ensure all CPUs were active before accessing the
sideband, as introduced in commit a75d035fedbd ("drm/i915: Disable
preemption and sleeping while using the punit sideband").

However, this wake-up operation is redundant. The preceding call to
cpu_latency_qos_update_request() already triggers cpu_latency_qos_apply(),
which internally invokes wake_up_all_idle_cpus(). This mechanism reliably
ensures that all CPUs exit idle states and are sufficiently active to
avoid the known hardware errata.

Removing the on_each_cpu() call and its empty callback eliminates
unnecessary inter-CPU SMP overhead and simplifies the code path.

Signed-off-by: Zhongqiu Han <quic_zhonhan@...cinc.com>
---
 drivers/gpu/drm/i915/vlv_sideband.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/vlv_sideband.c b/drivers/gpu/drm/i915/vlv_sideband.c
index 114ae8eb9cd5..d93b608c04e4 100644
--- a/drivers/gpu/drm/i915/vlv_sideband.c
+++ b/drivers/gpu/drm/i915/vlv_sideband.c
@@ -24,10 +24,6 @@
 /* Private register write, double-word addressing, non-posted */
 #define SB_CRWRDA_NP	0x07
 
-static void ping(void *info)
-{
-}
-
 static void __vlv_punit_get(struct drm_i915_private *i915)
 {
 	iosf_mbi_punit_acquire();
@@ -42,10 +38,8 @@ static void __vlv_punit_get(struct drm_i915_private *i915)
 	 * specific. Hence we presume the workaround needs only be applied
 	 * to the Valleyview P-unit and not all sideband communications.
 	 */
-	if (IS_VALLEYVIEW(i915)) {
+	if (IS_VALLEYVIEW(i915))
 		cpu_latency_qos_update_request(&i915->vlv_iosf_sb.qos, 0);
-		on_each_cpu(ping, NULL, 1);
-	}
 }
 
 static void __vlv_punit_put(struct drm_i915_private *i915)
-- 
2.43.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ