mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00

Disparate fence implementations are consolidated into fence.h. Also introduce RISCV_FENCE_ASM to make fence macro more reusable. Signed-off-by: Eric Chan <ericchancf@google.com> Reviewed-by: Andrea Parri <parri.andrea@gmail.com> Reviewed-by: Samuel Holland <samuel.holland@sifive.com> Tested-by: Samuel Holland <samuel.holland@sifive.com> Link: https://lore.kernel.org/r/20240217131316.3668927-1-ericchancf@google.com Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
15 lines
365 B
C
15 lines
365 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _ASM_RISCV_MMIOWB_H
|
|
#define _ASM_RISCV_MMIOWB_H
|
|
|
|
/*
|
|
* "o,w" is sufficient to ensure that all writes to the device have completed
|
|
* before the write to the spinlock is allowed to commit.
|
|
*/
|
|
#define mmiowb() RISCV_FENCE(o, w)
|
|
|
|
#include <linux/smp.h>
|
|
#include <asm-generic/mmiowb.h>
|
|
|
|
#endif /* _ASM_RISCV_MMIOWB_H */
|