[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v2 05/39] xen/riscv: introduce spinlock.h
Signed-off-by: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx> --- Changes in V2: - update definition of arch_lock_signal() to not violate cod style. - update definition of arch_lock_signal_wmb() to use WMB aspect. --- xen/arch/riscv/include/asm/spinlock.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 xen/arch/riscv/include/asm/spinlock.h diff --git a/xen/arch/riscv/include/asm/spinlock.h b/xen/arch/riscv/include/asm/spinlock.h new file mode 100644 index 0000000000..bf45a7f005 --- /dev/null +++ b/xen/arch/riscv/include/asm/spinlock.h @@ -0,0 +1,15 @@ +#ifndef __ASM_RISCV_SPINLOCK_H +#define __ASM_RISCV_SPINLOCK_H + +#define arch_lock_acquire_barrier() smp_mb() +#define arch_lock_release_barrier() smp_mb() + +#define arch_lock_relax() cpu_relax() +#define arch_lock_signal() ((void)0) +#define arch_lock_signal_wmb() \ +({ \ + smp_wmb(); \ + arch_lock_signal(); \ +}) + +#endif /* __ASM_RISCV_SPINLOCK_H */ -- 2.42.0
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |