/* SPDX-License-Identifier: GPL-2.0-only */1/*2* Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)3*/45#ifndef _ASM_ARC_ATOMIC_H6#define _ASM_ARC_ATOMIC_H78#ifndef __ASSEMBLER__910#include <linux/types.h>11#include <linux/compiler.h>12#include <asm/cmpxchg.h>13#include <asm/barrier.h>14#include <asm/smp.h>1516#define arch_atomic_read(v) READ_ONCE((v)->counter)1718#ifdef CONFIG_ARC_HAS_LLSC19#include <asm/atomic-llsc.h>20#else21#include <asm/atomic-spinlock.h>22#endif2324/*25* 64-bit atomics26*/27#ifdef CONFIG_GENERIC_ATOMIC6428#include <asm-generic/atomic64.h>29#else30#include <asm/atomic64-arcv2.h>31#endif3233#endif /* !__ASSEMBLER__ */3435#endif363738