Skip to content

OpenRISC Fixes for jump_label SMP Syncing

Stafford Horne lkml openrisc stable 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3openrisc: Cache invalidation cleanuparch/openrisc/kernel/head.S+0 -100 replies
2/3openrisc: Add full instruction cache invalidate functionsarch/openrisc/include/asm/cacheflush.h arch/openrisc/kernel/smp.c arch/openrisc/mm/cache.c+41 -00 replies
3/3openrisc: Fix jump_label smp syncingarch/openrisc/kernel/jump_label.c arch/openrisc/kernel/patching.c+4 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] OpenRISC Fixes for jump_label SMP Syncing

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(-)
Signature · 1 line
2.53.0