Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53a05ac1 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin
Browse files

ia64: reuse asm-generic/barrier.h



On ia64 smp_rmb, smp_wmb, read_barrier_depends, smp_read_barrier_depends
and smp_store_mb() match the asm-generic variants exactly. Drop the
local definitions and pull in asm-generic/barrier.h instead.

This is in preparation to refactoring this code area.

Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Acked-by: default avatarTony Luck <tony.luck@intel.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
parent 9505ec08
Loading
Loading
Loading
Loading
+2 −8
Original line number Original line Diff line number Diff line
@@ -48,12 +48,6 @@
# define smp_mb()	barrier()
# define smp_mb()	barrier()
#endif
#endif


#define smp_rmb()	smp_mb()
#define smp_wmb()	smp_mb()

#define read_barrier_depends()		do { } while (0)
#define smp_read_barrier_depends()	do { } while (0)

#define smp_mb__before_atomic()	barrier()
#define smp_mb__before_atomic()	barrier()
#define smp_mb__after_atomic()	barrier()
#define smp_mb__after_atomic()	barrier()


@@ -77,12 +71,12 @@ do { \
	___p1;								\
	___p1;								\
})
})


#define smp_store_mb(var, value) do { WRITE_ONCE(var, value); smp_mb(); } while (0)

/*
/*
 * The group barrier in front of the rsm & ssm are necessary to ensure
 * The group barrier in front of the rsm & ssm are necessary to ensure
 * that none of the previous instructions in the same group are
 * that none of the previous instructions in the same group are
 * affected by the rsm/ssm.
 * affected by the rsm/ssm.
 */
 */


#include <asm-generic/barrier.h>

#endif /* _ASM_IA64_BARRIER_H */
#endif /* _ASM_IA64_BARRIER_H */