[1/2] mmiowb: Rename mmiowb_spin_{lock, unlock}() to mmiowb_in_{lock, unlock}()
Commit Message
We are extending mmiowb tracking system from spinlock to mutex, so
rename mmiowb_spin_{lock, unlock}() to mmiowb_in_{lock, unlock}() to
reflect the fact. No functional changes.
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
---
include/asm-generic/mmiowb.h | 8 ++++----
include/linux/spinlock.h | 6 +++---
kernel/locking/spinlock_debug.c | 6 +++---
3 files changed, 10 insertions(+), 10 deletions(-)
@@ -40,13 +40,13 @@ static inline void mmiowb_set_pending(void)
ms->mmiowb_pending = ms->nesting_count;
}
-static inline void mmiowb_spin_lock(void)
+static inline void mmiowb_in_lock(void)
{
struct mmiowb_state *ms = __mmiowb_state();
ms->nesting_count++;
}
-static inline void mmiowb_spin_unlock(void)
+static inline void mmiowb_in_unlock(void)
{
struct mmiowb_state *ms = __mmiowb_state();
@@ -59,7 +59,7 @@ static inline void mmiowb_spin_unlock(void)
}
#else
#define mmiowb_set_pending() do { } while (0)
-#define mmiowb_spin_lock() do { } while (0)
-#define mmiowb_spin_unlock() do { } while (0)
+#define mmiowb_in_lock() do { } while (0)
+#define mmiowb_in_unlock() do { } while (0)
#endif /* CONFIG_MMIOWB */
#endif /* __ASM_GENERIC_MMIOWB_H */
@@ -185,7 +185,7 @@ static inline void do_raw_spin_lock(raw_spinlock_t *lock) __acquires(lock)
{
__acquire(lock);
arch_spin_lock(&lock->raw_lock);
- mmiowb_spin_lock();
+ mmiowb_in_lock();
}
static inline int do_raw_spin_trylock(raw_spinlock_t *lock)
@@ -193,14 +193,14 @@ static inline int do_raw_spin_trylock(raw_spinlock_t *lock)
int ret = arch_spin_trylock(&(lock)->raw_lock);
if (ret)
- mmiowb_spin_lock();
+ mmiowb_in_lock();
return ret;
}
static inline void do_raw_spin_unlock(raw_spinlock_t *lock) __releases(lock)
{
- mmiowb_spin_unlock();
+ mmiowb_in_unlock();
arch_spin_unlock(&lock->raw_lock);
__release(lock);
}
@@ -114,7 +114,7 @@ void do_raw_spin_lock(raw_spinlock_t *lock)
{
debug_spin_lock_before(lock);
arch_spin_lock(&lock->raw_lock);
- mmiowb_spin_lock();
+ mmiowb_in_lock();
debug_spin_lock_after(lock);
}
@@ -123,7 +123,7 @@ int do_raw_spin_trylock(raw_spinlock_t *lock)
int ret = arch_spin_trylock(&lock->raw_lock);
if (ret) {
- mmiowb_spin_lock();
+ mmiowb_in_lock();
debug_spin_lock_after(lock);
}
#ifndef CONFIG_SMP
@@ -137,7 +137,7 @@ int do_raw_spin_trylock(raw_spinlock_t *lock)
void do_raw_spin_unlock(raw_spinlock_t *lock)
{
- mmiowb_spin_unlock();
+ mmiowb_in_unlock();
debug_spin_unlock(lock);
arch_spin_unlock(&lock->raw_lock);
}