mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] OpenRISC Fixes for jump_label SMP Syncing
@ 2026-05-23  5:36 Stafford Horne
  2026-05-23  5:36 ` [PATCH 1/3] openrisc: Cache invalidation cleanup Stafford Horne
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Stafford Horne @ 2026-05-23  5:36 UTC (permalink / raw)
  To: LKML; +Cc: Linux OpenRISC, Stafford Horne

On OpenRISC I noticed our jump_label implementation based on arm64 uses
kick_all_cpus_sync() to force remote cores to pick up static_key updates.  The
call to kick_all_cpus_sync() on OpenRISC does run IPIs on remote cores, but it
does not have any guarantees about instruction cache invalidation.

The jump_label code seems to work fine and passes tests, but I had suspicions
that this was incorrect.  My suspicion was correct, and I was able to reproduce
issues where static_keys on remote cores were left stale after jump_label
updates using a custom test [0].

This series fixes the issues by triggering remote icache invalidation after
jump_label text patching is done.

[0] https://github.com/stffrdhrn/or1k-utils/tree/master/tests/smp_static_key_test

Stafford Horne (3):
  openrisc: Cache invalidation cleanup
  openrisc: Add full instruction cache invalidate functions
  openrisc: Fix jump_label smp syncing

 arch/openrisc/include/asm/cacheflush.h |  4 ++++
 arch/openrisc/kernel/head.S            | 10 ----------
 arch/openrisc/kernel/jump_label.c      |  2 +-
 arch/openrisc/kernel/patching.c        |  3 +++
 arch/openrisc/kernel/smp.c             | 21 +++++++++++++++++++++
 arch/openrisc/mm/cache.c               | 16 ++++++++++++++++
 6 files changed, 45 insertions(+), 11 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-05-23  5:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-05-23  5:36 [PATCH 0/3] OpenRISC Fixes for jump_label SMP Syncing Stafford Horne
2026-05-23  5:36 ` [PATCH 1/3] openrisc: Cache invalidation cleanup Stafford Horne
2026-05-23  5:36 ` [PATCH 2/3] openrisc: Add full instruction cache invalidate functions Stafford Horne
2026-05-23  5:36 ` [PATCH 3/3] openrisc: Fix jump_label smp syncing Stafford Horne

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®