Skip to contentSkip to conversation

misc: sgi-gru: fill execution status in exception details

PATCH New Yousef Alhouseen 1 participant 1 message Jun 30 Char and misc drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 misc: sgi-gru: fill execution status in exception details

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.

---
 drivers/misc/sgi-gru/grukservices.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/misc/sgi-gru/grukservices.c +3 -1
index 205945ce9e86..c16012ee976f 100644
@@ -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();
 }
-
Signature · 1 line
2.54.0