18c2ecf20Sopenharmony_ci/*
28c2ecf20Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public
38c2ecf20Sopenharmony_ci * License.  See the file "COPYING" in the main directory of this archive
48c2ecf20Sopenharmony_ci * for more details.
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci * Copyright (C) 1999, 2000, 06 Ralf Baechle (ralf@linux-mips.org)
78c2ecf20Sopenharmony_ci * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
88c2ecf20Sopenharmony_ci */
98c2ecf20Sopenharmony_ci#ifndef _ASM_SPINLOCK_H
108c2ecf20Sopenharmony_ci#define _ASM_SPINLOCK_H
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_ci#include <asm/processor.h>
138c2ecf20Sopenharmony_ci#include <asm/qrwlock.h>
148c2ecf20Sopenharmony_ci
158c2ecf20Sopenharmony_ci#include <asm-generic/qspinlock_types.h>
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci#define	queued_spin_unlock queued_spin_unlock
188c2ecf20Sopenharmony_ci/**
198c2ecf20Sopenharmony_ci * queued_spin_unlock - release a queued spinlock
208c2ecf20Sopenharmony_ci * @lock : Pointer to queued spinlock structure
218c2ecf20Sopenharmony_ci */
228c2ecf20Sopenharmony_cistatic inline void queued_spin_unlock(struct qspinlock *lock)
238c2ecf20Sopenharmony_ci{
248c2ecf20Sopenharmony_ci	/* This could be optimised with ARCH_HAS_MMIOWB */
258c2ecf20Sopenharmony_ci	mmiowb();
268c2ecf20Sopenharmony_ci	smp_store_release(&lock->locked, 0);
278c2ecf20Sopenharmony_ci}
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci#include <asm/qspinlock.h>
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#endif /* _ASM_SPINLOCK_H */
32