blob: f7028f5e1a5a3bff399a7a02aa4655f7cad8e012 [file] [log] [blame]
Sam Ravnborgf5e706a2008-07-17 21:55:51 -07001/* spinlock.h: 64-bit Sparc spinlock support.
2 *
3 * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
4 */
5
6#ifndef __SPARC64_SPINLOCK_H
7#define __SPARC64_SPINLOCK_H
8
Sam Ravnborgf5e706a2008-07-17 21:55:51 -07009#ifndef __ASSEMBLY__
10
Peter Zijlstra726328d2016-05-26 10:35:03 +020011#include <asm/processor.h>
12#include <asm/barrier.h>
Babu Mogera37594f2017-05-24 17:55:13 -060013#include <asm/qrwlock.h>
Babu Moger145d9782017-05-24 17:55:15 -060014#include <asm/qspinlock.h>
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070015
Thomas Gleixnere5931942009-12-03 20:08:46 +010016#define arch_read_lock_flags(p, f) arch_read_lock(p)
Thomas Gleixnere5931942009-12-03 20:08:46 +010017#define arch_write_lock_flags(p, f) arch_write_lock(p)
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070018
Thomas Gleixner0199c4e2009-12-02 20:01:25 +010019#define arch_spin_relax(lock) cpu_relax()
20#define arch_read_relax(lock) cpu_relax()
21#define arch_write_relax(lock) cpu_relax()
Sam Ravnborgf5e706a2008-07-17 21:55:51 -070022
23#endif /* !(__ASSEMBLY__) */
24
25#endif /* !(__SPARC64_SPINLOCK_H) */