blob: 8a88eb2655160da1a5055af4249825046026ab4b [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1999, 2000, 06 Ralf Baechle (ralf@linux-mips.org)
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 */
9#ifndef _ASM_SPINLOCK_H
10#define _ASM_SPINLOCK_H
11
12#include <asm/processor.h>
13#include <asm/qrwlock.h>
David Brazdil0f672f62019-12-10 10:32:29 +000014
15#include <asm-generic/qspinlock_types.h>
16
17#define queued_spin_unlock queued_spin_unlock
18/**
19 * queued_spin_unlock - release a queued spinlock
20 * @lock : Pointer to queued spinlock structure
21 */
22static inline void queued_spin_unlock(struct qspinlock *lock)
23{
24 /* This could be optimised with ARCH_HAS_MMIOWB */
25 mmiowb();
26 smp_store_release(&lock->locked, 0);
27}
28
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000029#include <asm/qspinlock.h>
30
31#endif /* _ASM_SPINLOCK_H */