[PATCH] misc: sgi-gru: fill execution status in exception details
From: Yousef Alhouseen
Date: Tue Jun 30 2026 - 06:50:11 EST
gru_retry_exception() tests cbrexecstatus after asking
gru_get_cb_exception_detail() to fill the detail structure. The helper
leaves that field uninitialized, so retry decisions depend on stale
stack data.
Populate the address, CBR state, and execution status alongside the
other exception fields, matching the user exception-detail path.
Signed-off-by: Yousef Alhouseen <alhouseenyousef@xxxxxxxxx>
---
drivers/misc/sgi-gru/grukservices.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/sgi-gru/grukservices.c b/drivers/misc/sgi-gru/grukservices.c
index 205945ce9e86..c16012ee976f 100644
--- a/drivers/misc/sgi-gru/grukservices.c
+++ b/drivers/misc/sgi-gru/grukservices.c
@@ -411,11 +411,14 @@ int gru_get_cb_exception_detail(void *cb,
cbe = get_cbe(GRUBASE(cb), cbrnum);
gru_flush_cache(cbe); /* CBE not coherent */
sync_core();
+ excdet->cb = (unsigned long)cb;
excdet->opc = cbe->opccpy;
excdet->exopc = cbe->exopccpy;
excdet->ecause = cbe->ecause;
excdet->exceptdet0 = cbe->idef1upd;
excdet->exceptdet1 = cbe->idef3upd;
+ excdet->cbrstate = cbe->cbrstate;
+ excdet->cbrexecstatus = cbe->cbrexecstatus;
gru_flush_cache(cbe);
return 0;
}
@@ -1154,4 +1157,3 @@ void gru_kservices_exit(void)
if (gru_free_kernel_contexts())
BUG();
}
-
--
2.54.0