From ace9429bb58fd418f0c81d4c2835699bddf6bde6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 11 Apr 2024 10:27:49 +0200 Subject: Adding upstream version 6.6.15. Signed-off-by: Daniel Baumann --- arch/alpha/include/asm/barrier.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 arch/alpha/include/asm/barrier.h (limited to 'arch/alpha/include/asm/barrier.h') diff --git a/arch/alpha/include/asm/barrier.h b/arch/alpha/include/asm/barrier.h new file mode 100644 index 0000000000..c56bfffc99 --- /dev/null +++ b/arch/alpha/include/asm/barrier.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef __BARRIER_H +#define __BARRIER_H + +#define mb() __asm__ __volatile__("mb": : :"memory") +#define rmb() __asm__ __volatile__("mb": : :"memory") +#define wmb() __asm__ __volatile__("wmb": : :"memory") + +#define __smp_load_acquire(p) \ +({ \ + compiletime_assert_atomic_type(*p); \ + __READ_ONCE(*p); \ +}) + +#ifdef CONFIG_SMP +#define __ASM_SMP_MB "\tmb\n" +#else +#define __ASM_SMP_MB +#endif + +#include + +#endif /* __BARRIER_H */ -- cgit v1.2.3