/* SPDX-License-Identifier: GPL-2.0-or-later */1/*2* Copied from the kernel sources to tools/perf/:3*4* Generic barrier definitions.5*6* It should be possible to use these on really simple architectures,7* but it serves more as a starting point for new ports.8*9* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.10* Written by David Howells ([email protected])11*/12#ifndef __TOOLS_LINUX_ASM_GENERIC_BARRIER_H13#define __TOOLS_LINUX_ASM_GENERIC_BARRIER_H1415#ifndef __ASSEMBLY__1617#include <linux/compiler.h>1819/*20* Force strict CPU ordering. And yes, this is required on UP too when we're21* talking to devices.22*23* Fall back to compiler barriers if nothing better is provided.24*/2526#ifndef mb27#define mb() barrier()28#endif2930#ifndef rmb31#define rmb() mb()32#endif3334#ifndef wmb35#define wmb() mb()36#endif3738#endif /* !__ASSEMBLY__ */39#endif /* __TOOLS_LINUX_ASM_GENERIC_BARRIER_H */404142