[PATCH 1/2] mmiowb: Rename mmiowb_spin_{lock, unlock}() to mmiowb_in_{lock, unlock}()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>
---
 include/asm-generic/mmiowb.h    | 8 ++++----
 include/linux/spinlock.h        | 6 +++---
 kernel/locking/spinlock_debug.c | 6 +++---
 3 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/asm-generic/mmiowb.h b/include/asm-generic/mmiowb.h
index 5698fca3bf56..eb2335f9f35e 100644
--- a/include/asm-generic/mmiowb.h
+++ b/include/asm-generic/mmiowb.h
@@ -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 */
diff --git a/include/linux/spinlock.h b/include/linux/spinlock.h
index 3fcd20de6ca8..60eda70cddd0 100644
--- a/include/linux/spinlock.h
+++ b/include/linux/spinlock.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);
 }
diff --git a/kernel/locking/spinlock_debug.c b/kernel/locking/spinlock_debug.c
index 87b03d2e41db..632a88322433 100644
--- a/kernel/locking/spinlock_debug.c
+++ b/kernel/locking/spinlock_debug.c
@@ -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);
 }
-- 
2.43.0





[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux