162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public
362306a36Sopenharmony_ci * License.  See the file "COPYING" in the main directory of this archive
462306a36Sopenharmony_ci * for more details.
562306a36Sopenharmony_ci *
662306a36Sopenharmony_ci * Copyright (C) 1999, 2000, 06 Ralf Baechle (ralf@linux-mips.org)
762306a36Sopenharmony_ci * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
862306a36Sopenharmony_ci */
962306a36Sopenharmony_ci#ifndef _ASM_SPINLOCK_H
1062306a36Sopenharmony_ci#define _ASM_SPINLOCK_H
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci#include <asm/processor.h>
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci#include <asm-generic/qspinlock_types.h>
1562306a36Sopenharmony_ci
1662306a36Sopenharmony_ci#define	queued_spin_unlock queued_spin_unlock
1762306a36Sopenharmony_ci/**
1862306a36Sopenharmony_ci * queued_spin_unlock - release a queued spinlock
1962306a36Sopenharmony_ci * @lock : Pointer to queued spinlock structure
2062306a36Sopenharmony_ci */
2162306a36Sopenharmony_cistatic inline void queued_spin_unlock(struct qspinlock *lock)
2262306a36Sopenharmony_ci{
2362306a36Sopenharmony_ci	/* This could be optimised with ARCH_HAS_MMIOWB */
2462306a36Sopenharmony_ci	mmiowb();
2562306a36Sopenharmony_ci	smp_store_release(&lock->locked, 0);
2662306a36Sopenharmony_ci}
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci#include <asm/qspinlock.h>
2962306a36Sopenharmony_ci#include <asm/qrwlock.h>
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci#endif /* _ASM_SPINLOCK_H */
32