All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] drm/xe/survivability: Fix infinite loop in aux info traversal
@ 2026-11-25  9:32 Sk Anirban
  2026-11-25  9:59 ` ✓ CI.KUnit: success for drm/xe/survivability: Fix infinite loop in aux info traversal (rev3) Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Sk Anirban @ 2026-11-25  9:32 UTC (permalink / raw)
  To: intel-xe
  Cc: anshuman.gupta, badal.nilawar, riana.tauro, karthik.poosa,
	raag.jadav, soham.purkait, mallesh.koujalagi, hiresh.kumar.yadav,
	Sk Anirban

AUX info register traversal can loop indefinitely when a register
points back to itself. Avoid revisiting registers by reading each
register once and collecting the entries that contain data.

v2: Add fixes (Riana)
    Modify loop (Riana)
v3: Remove non-zero check (Riana)

Fixes: 5e940312a2ac ("drm/xe: Add functions and sysfs for boot survivability")
Signed-off-by: Sk Anirban <sk.anirban@intel.com>
---
 drivers/gpu/drm/xe/xe_survivability_mode.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_survivability_mode.c b/drivers/gpu/drm/xe/xe_survivability_mode.c
index 91a0680e449b..2787ed952d2b 100644
--- a/drivers/gpu/drm/xe/xe_survivability_mode.c
+++ b/drivers/gpu/drm/xe/xe_survivability_mode.c
@@ -168,11 +168,9 @@ static void populate_survivability_info(struct xe_device *xe)
 			set_survivability_info(mmio, info, POSTCODE_TRACE_OVERFLOW);
 	}
 
-	/* Traverse the linked list of aux info registers */
+	/* Read all aux info registers */
 	if (reg_value & AUXINFO_SUPPORT) {
-		for (id = REG_FIELD_GET(AUXINFO_REG_OFFSET, reg_value);
-		     id >= AUX_INFO0 && id < MAX_SCRATCH_REG;
-		     id =  REG_FIELD_GET(AUXINFO_HISTORY_OFFSET, info[id]))
+		for (id = AUX_INFO0; id < MAX_SCRATCH_REG; id++)
 			set_survivability_info(mmio, info, id);
 	}
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-25 14:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-25  9:32 [PATCH v3] drm/xe/survivability: Fix infinite loop in aux info traversal Sk Anirban
2026-11-25  9:59 ` ✓ CI.KUnit: success for drm/xe/survivability: Fix infinite loop in aux info traversal (rev3) Patchwork
2026-11-25 10:40 ` ✓ Xe.CI.BAT: " Patchwork
2026-11-25 12:55 ` ✓ Xe.CI.FULL: " Patchwork
2026-11-25 14:20 ` [PATCH v3] drm/xe/survivability: Fix infinite loop in aux info traversal Tauro, Riana

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.