diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/gsp_phys_booter.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index 7c4a946..3d0aae2 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -31076,7 +31076,7 @@ static int gsp_phys_ds_spy_show(struct seq_file *m, void *unused) { void __iomem *bar0 = gsp_phys_gpu_bar0(); u64 t0; - u32 hits = 0, samples = 0; + u32 hits = 0, samples = 0, maskholds = 0, mask0_last = 0, mask2_last = 0; u32 ms = READ_ONCE(gsp_phys_ds_spy_ms); if (!bar0) @@ -31093,7 +31093,31 @@ static int gsp_phys_ds_spy_show(struct seq_file *m, void *unused) t0 = ktime_get_ns(); while (ktime_get_ns() - t0 < (u64)ms * 1000000ull) { u32 esr = readl(bar0 + GSP_PHYS_DS_ESR); + u32 m0 = readl(bar0 + GSP_PHYS_DS_REPORT_MASK); + u32 m2 = readl(bar0 + GSP_PHYS_DS_REPORT_MASK_2); + /* + * SESSION 153-CONTINUED-97: hold the HWW report masks + * cleared while sampling. A pending report POISONS the + * whole PRI block (every read returns 0xbadf1201), which + * hid the SPH stage snapshot at the validation instant + * (r1325 spy2: all 16+ hits badf1201, masks back at + * 00ffffff). The mask is (re)armed by the context load / + * the RM setup, not only by our replay path, so re-clear + * it every sample; the re-clear count is logged so the + * capture's provenance is visible. NOTE (r1326): poison + * still appeared on one pass despite 29 re-clears, so a + * clean latch is not guaranteed and the store-side read + * remains the authoritative fault-time datum. + * Development-only diagnostic tap. + */ + if (m0 || m2) { + iowrite32(0u, bar0 + GSP_PHYS_DS_REPORT_MASK); + iowrite32(0u, bar0 + GSP_PHYS_DS_REPORT_MASK_2); + maskholds++; + mask0_last = m0; + mask2_last = m2; + } samples++; if (esr & 0x7fffffffu) { u32 esr2 = readl(bar0 + GSP_PHYS_DS_ESR_2); @@ -31122,7 +31146,8 @@ static int gsp_phys_ds_spy_show(struct seq_file *m, void *unused) udelay(20); } } - seq_printf(m, "# DS-SPY end samples=%u hits=%u\n", samples, hits); + seq_printf(m, "# DS-SPY end samples=%u hits=%u maskholds=%u last_mask=%08x/%08x\n", + samples, hits, maskholds, mask0_last, mask2_last); return 0; } |
