summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorMuhammad Usama Anjum <usama.anjum@arm.com>2026-07-30 12:12:52 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-07-31 14:15:54 +0200
commit48c7907d928139debf4d73575f688e858ff24aca (patch)
tree9b4b02b72c1abc77a83851472118f9c89c085e04 /drivers/misc
parent7d58b218e7e3552d718117eb859acb1b2df90720 (diff)
downloadlinux-next-48c7907d928139debf4d73575f688e858ff24aca.tar.gz
linux-next-48c7907d928139debf4d73575f688e858ff24aca.zip
misc: sgi-gru: inline the user CBR status update
The process-context fault path always has a valid user CBR pointer. Inline the one-use status helper and remove its obsolete NULL check. No functional change. Signed-off-by: Muhammad Usama Anjum <usama.anjum@arm.com> Link: https://patch.msgid.link/20260730111316.3672672-4-usama.anjum@arm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/sgi-gru/grufault.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/misc/sgi-gru/grufault.c b/drivers/misc/sgi-gru/grufault.c
index e43fdea01cb6..6b7e7dc37eac 100644
--- a/drivers/misc/sgi-gru/grufault.c
+++ b/drivers/misc/sgi-gru/grufault.c
@@ -112,21 +112,6 @@ static void gru_unlock_gts(struct gru_thread_state *gts)
}
/*
- * Set a CB.istatus to active using a user virtual address. This must be done
- * just prior to a TFH RESTART. The new cb.istatus is an in-cache status ONLY.
- * If the line is evicted, the status may be lost. The in-cache update
- * is necessary to prevent the user from seeing a stale cb.istatus that will
- * change as soon as the TFH restart is complete. Races may cause an
- * occasional failure to clear the cb.istatus, but that is ok.
- */
-static void gru_cb_set_istatus_active(struct gru_instruction_bits *cbk)
-{
- if (cbk) {
- cbk->istatus = CBS_ACTIVE;
- }
-}
-
-/*
* Read & clear a TFM
*
* The GRU has an array of fault maps. A map is private to a cpu
@@ -354,7 +339,12 @@ static int gru_try_dropin(struct gru_state *gru,
gru_flush_cache_cbe(cbe);
}
- gru_cb_set_istatus_active(cbk);
+ /*
+ * Set CB.istatus active in cache before restarting the TFH to avoid
+ * exposing stale pre-restart status. Cacheline eviction may lose the
+ * update, but an occasional stale status is harmless.
+ */
+ cbk->istatus = CBS_ACTIVE;
gts->ustats.tlbdropin++;
tfh_write_restart(tfh, gpa, GAA_RAM, vaddr, asid, write,
GRU_PAGESIZE(pageshift));