Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 1 | /* 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 Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 9 | #ifndef __ASSEMBLY__ |
| 10 | |
Peter Zijlstra | 726328d | 2016-05-26 10:35:03 +0200 | [diff] [blame] | 11 | #include <asm/processor.h> |
| 12 | #include <asm/barrier.h> |
Babu Moger | a37594f | 2017-05-24 17:55:13 -0600 | [diff] [blame] | 13 | #include <asm/qrwlock.h> |
Babu Moger | 145d978 | 2017-05-24 17:55:15 -0600 | [diff] [blame^] | 14 | #include <asm/qspinlock.h> |
Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 15 | |
Thomas Gleixner | e593194 | 2009-12-03 20:08:46 +0100 | [diff] [blame] | 16 | #define arch_read_lock_flags(p, f) arch_read_lock(p) |
Thomas Gleixner | e593194 | 2009-12-03 20:08:46 +0100 | [diff] [blame] | 17 | #define arch_write_lock_flags(p, f) arch_write_lock(p) |
Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 18 | |
Thomas Gleixner | 0199c4e | 2009-12-02 20:01:25 +0100 | [diff] [blame] | 19 | #define arch_spin_relax(lock) cpu_relax() |
| 20 | #define arch_read_relax(lock) cpu_relax() |
| 21 | #define arch_write_relax(lock) cpu_relax() |
Sam Ravnborg | f5e706a | 2008-07-17 21:55:51 -0700 | [diff] [blame] | 22 | |
| 23 | #endif /* !(__ASSEMBLY__) */ |
| 24 | |
| 25 | #endif /* !(__SPARC64_SPINLOCK_H) */ |