locking: Introduce prepare_sync_core_cmd()
authorAndrea Parri <parri.andrea@gmail.com>
Wed, 31 Jan 2024 14:49:35 +0000 (15:49 +0100)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 15 Feb 2024 16:04:13 +0000 (08:04 -0800)
commit4ff4c745a16c4c151a71863420811e7f406c3ec2
treefcda33acb75221cff1faee8582ab99e6ee96adbf
parenta14d11a0f5f4105e0df96811dfa81dc5f79fecba
locking: Introduce prepare_sync_core_cmd()

Introduce an architecture function that architectures can use to set
up ("prepare") SYNC_CORE commands.

The function will be used by RISC-V to update its "deferred icache-
flush" data structures (icache_stale_mask).

Architectures defining prepare_sync_core_cmd() static inline need to
select ARCH_HAS_PREPARE_SYNC_CORE_CMD.

Suggested-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Andrea Parri <parri.andrea@gmail.com>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://lore.kernel.org/r/20240131144936.29190-4-parri.andrea@gmail.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
include/linux/sync_core.h
init/Kconfig
kernel/sched/membarrier.c