linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	David Miller <davem@davemloft.net>, Benjamin Herrenschmidt <be>
Cc: linux-arch@vger.kernel.org,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnd Bergmann <arnd@arndb.de>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Horst Hartmann <horsth@linux.vnet.ibm.com>,
	Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: [patch 1/9] powerpc: rename __spin_try_lock() and friends
Date: Mon, 31 Aug 2009 14:43:31 +0200	[thread overview]
Message-ID: <20090831124415.918799705@de.ibm.com> (raw)
In-Reply-To: 20090831124330.014480226@de.ibm.com

[-- Attachment #1: powerpc.diff --]
[-- Type: text/plain, Size: 3278 bytes --]

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Rename __spin_try_trylock() and friends to arch_spin_try_lock() etc.

Needed to avoid namespace conflicts when the common code function
bodies of _spin_try_lock() etc. are moved to a header file where the
function name would be __spin_try_lock().

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 arch/powerpc/include/asm/spinlock.h |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Index: linux-2.6/arch/powerpc/include/asm/spinlock.h
===================================================================
--- linux-2.6.orig/arch/powerpc/include/asm/spinlock.h
+++ linux-2.6/arch/powerpc/include/asm/spinlock.h
@@ -54,7 +54,7 @@
  * This returns the old value in the lock, so we succeeded
  * in getting the lock if the return value is 0.
  */
-static inline unsigned long __spin_trylock(raw_spinlock_t *lock)
+static inline unsigned long arch_spin_trylock(raw_spinlock_t *lock)
 {
 	unsigned long tmp, token;
 
@@ -76,7 +76,7 @@ static inline unsigned long __spin_trylo
 static inline int __raw_spin_trylock(raw_spinlock_t *lock)
 {
 	CLEAR_IO_SYNC;
-	return __spin_trylock(lock) == 0;
+	return arch_spin_trylock(lock) == 0;
 }
 
 /*
@@ -108,7 +108,7 @@ static inline void __raw_spin_lock(raw_s
 {
 	CLEAR_IO_SYNC;
 	while (1) {
-		if (likely(__spin_trylock(lock) == 0))
+		if (likely(arch_spin_trylock(lock) == 0))
 			break;
 		do {
 			HMT_low();
@@ -126,7 +126,7 @@ void __raw_spin_lock_flags(raw_spinlock_
 
 	CLEAR_IO_SYNC;
 	while (1) {
-		if (likely(__spin_trylock(lock) == 0))
+		if (likely(arch_spin_trylock(lock) == 0))
 			break;
 		local_save_flags(flags_dis);
 		local_irq_restore(flags);
@@ -181,7 +181,7 @@ extern void __raw_spin_unlock_wait(raw_s
  * This returns the old value in the lock + 1,
  * so we got a read lock if the return value is > 0.
  */
-static inline long __read_trylock(raw_rwlock_t *rw)
+static inline long arch_read_trylock(raw_rwlock_t *rw)
 {
 	long tmp;
 
@@ -205,7 +205,7 @@ static inline long __read_trylock(raw_rw
  * This returns the old value in the lock,
  * so we got the write lock if the return value is 0.
  */
-static inline long __write_trylock(raw_rwlock_t *rw)
+static inline long arch_write_trylock(raw_rwlock_t *rw)
 {
 	long tmp, token;
 
@@ -228,7 +228,7 @@ static inline long __write_trylock(raw_r
 static inline void __raw_read_lock(raw_rwlock_t *rw)
 {
 	while (1) {
-		if (likely(__read_trylock(rw) > 0))
+		if (likely(arch_read_trylock(rw) > 0))
 			break;
 		do {
 			HMT_low();
@@ -242,7 +242,7 @@ static inline void __raw_read_lock(raw_r
 static inline void __raw_write_lock(raw_rwlock_t *rw)
 {
 	while (1) {
-		if (likely(__write_trylock(rw) == 0))
+		if (likely(arch_write_trylock(rw) == 0))
 			break;
 		do {
 			HMT_low();
@@ -255,12 +255,12 @@ static inline void __raw_write_lock(raw_
 
 static inline int __raw_read_trylock(raw_rwlock_t *rw)
 {
-	return __read_trylock(rw) > 0;
+	return arch_read_trylock(rw) > 0;
 }
 
 static inline int __raw_write_trylock(raw_rwlock_t *rw)
 {
-	return __write_trylock(rw) == 0;
+	return arch_write_trylock(rw) == 0;
 }
 
 static inline void __raw_read_unlock(raw_rwlock_t *rw)

-- 

WARNING: multiple messages have this Message-ID (diff)
From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	David Miller <davem@davemloft.net>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Roman Zippel <zippel@linux-m68k.org>
Cc: linux-arch@vger.kernel.org,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	Arnd Bergmann <arnd@arndb.de>,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	Horst Hartmann <horsth@linux.vnet.ibm.com>,
	Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>
Subject: [patch 1/9] powerpc: rename __spin_try_lock() and friends
Date: Mon, 31 Aug 2009 14:43:31 +0200	[thread overview]
Message-ID: <20090831124415.918799705@de.ibm.com> (raw)
Message-ID: <20090831124331.g4PnUXG3tXJYFZAVWFJnCBRUEE5WdskcFMGvYSrcqe8@z> (raw)
In-Reply-To: 20090831124330.014480226@de.ibm.com

[-- Attachment #1: powerpc.diff --]
[-- Type: text/plain, Size: 3278 bytes --]

From: Heiko Carstens <heiko.carstens@de.ibm.com>

Rename __spin_try_trylock() and friends to arch_spin_try_lock() etc.

Needed to avoid namespace conflicts when the common code function
bodies of _spin_try_lock() etc. are moved to a header file where the
function name would be __spin_try_lock().

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
---
 arch/powerpc/include/asm/spinlock.h |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

Index: linux-2.6/arch/powerpc/include/asm/spinlock.h
===================================================================
--- linux-2.6.orig/arch/powerpc/include/asm/spinlock.h
+++ linux-2.6/arch/powerpc/include/asm/spinlock.h
@@ -54,7 +54,7 @@
  * This returns the old value in the lock, so we succeeded
  * in getting the lock if the return value is 0.
  */
-static inline unsigned long __spin_trylock(raw_spinlock_t *lock)
+static inline unsigned long arch_spin_trylock(raw_spinlock_t *lock)
 {
 	unsigned long tmp, token;
 
@@ -76,7 +76,7 @@ static inline unsigned long __spin_trylo
 static inline int __raw_spin_trylock(raw_spinlock_t *lock)
 {
 	CLEAR_IO_SYNC;
-	return __spin_trylock(lock) == 0;
+	return arch_spin_trylock(lock) == 0;
 }
 
 /*
@@ -108,7 +108,7 @@ static inline void __raw_spin_lock(raw_s
 {
 	CLEAR_IO_SYNC;
 	while (1) {
-		if (likely(__spin_trylock(lock) == 0))
+		if (likely(arch_spin_trylock(lock) == 0))
 			break;
 		do {
 			HMT_low();
@@ -126,7 +126,7 @@ void __raw_spin_lock_flags(raw_spinlock_
 
 	CLEAR_IO_SYNC;
 	while (1) {
-		if (likely(__spin_trylock(lock) == 0))
+		if (likely(arch_spin_trylock(lock) == 0))
 			break;
 		local_save_flags(flags_dis);
 		local_irq_restore(flags);
@@ -181,7 +181,7 @@ extern void __raw_spin_unlock_wait(raw_s
  * This returns the old value in the lock + 1,
  * so we got a read lock if the return value is > 0.
  */
-static inline long __read_trylock(raw_rwlock_t *rw)
+static inline long arch_read_trylock(raw_rwlock_t *rw)
 {
 	long tmp;
 
@@ -205,7 +205,7 @@ static inline long __read_trylock(raw_rw
  * This returns the old value in the lock,
  * so we got the write lock if the return value is 0.
  */
-static inline long __write_trylock(raw_rwlock_t *rw)
+static inline long arch_write_trylock(raw_rwlock_t *rw)
 {
 	long tmp, token;
 
@@ -228,7 +228,7 @@ static inline long __write_trylock(raw_r
 static inline void __raw_read_lock(raw_rwlock_t *rw)
 {
 	while (1) {
-		if (likely(__read_trylock(rw) > 0))
+		if (likely(arch_read_trylock(rw) > 0))
 			break;
 		do {
 			HMT_low();
@@ -242,7 +242,7 @@ static inline void __raw_read_lock(raw_r
 static inline void __raw_write_lock(raw_rwlock_t *rw)
 {
 	while (1) {
-		if (likely(__write_trylock(rw) == 0))
+		if (likely(arch_write_trylock(rw) == 0))
 			break;
 		do {
 			HMT_low();
@@ -255,12 +255,12 @@ static inline void __raw_write_lock(raw_
 
 static inline int __raw_read_trylock(raw_rwlock_t *rw)
 {
-	return __read_trylock(rw) > 0;
+	return arch_read_trylock(rw) > 0;
 }
 
 static inline int __raw_write_trylock(raw_rwlock_t *rw)
 {
-	return __write_trylock(rw) == 0;
+	return arch_write_trylock(rw) == 0;
 }
 
 static inline void __raw_read_unlock(raw_rwlock_t *rw)

-- 

  parent reply	other threads:[~2009-08-31 12:44 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-31 12:43 [patch 0/9] Allow inlined spinlocks again V6 Heiko Carstens
2009-08-31 12:43 ` Heiko Carstens
2009-08-31 12:43 ` Heiko Carstens [this message]
2009-08-31 12:43   ` [patch 1/9] powerpc: rename __spin_try_lock() and friends Heiko Carstens
2009-08-31 17:07   ` [tip:core/locking] locking, powerpc: Rename " tip-bot for Heiko Carstens
2009-08-31 17:07     ` tip-bot for Heiko Carstens
2009-08-31 12:43 ` [patch 2/9] sparc: rename " Heiko Carstens
2009-08-31 12:43   ` Heiko Carstens
2009-08-31 17:07   ` [tip:core/locking] locking, sparc: Rename " tip-bot for Heiko Carstens
2009-08-31 12:43 ` [patch 3/9] m68k/asm-offsets: rename pt_regs offset defines Heiko Carstens
2009-08-31 12:43   ` Heiko Carstens
2009-08-31 17:07   ` [tip:core/locking] locking, m68k/asm-offsets: Rename " tip-bot for Heiko Carstens
2009-08-31 17:07     ` tip-bot for Heiko Carstens
2009-08-31 12:43 ` [patch 4/9] m68k/asm-offsets: rename signal defines Heiko Carstens
2009-08-31 12:43   ` Heiko Carstens
2009-09-01 13:58   ` [tip:core/locking] locking, m68k/asm-offsets: Rename " tip-bot for Heiko Carstens
2009-08-31 12:43 ` [patch 5/9] m68k: calculate thread_info offset with asm offset Heiko Carstens
2009-08-31 12:43   ` Heiko Carstens
2009-08-31 17:07   ` [tip:core/locking] locking, m68k: Calculate " tip-bot for Heiko Carstens
2009-08-31 17:07     ` tip-bot for Heiko Carstens
2009-08-31 12:43 ` [patch 6/9] spinlock: move spinlock function bodies to header file Heiko Carstens
2009-08-31 12:43   ` Heiko Carstens
2009-08-31 17:07   ` [tip:core/locking] locking: Move " tip-bot for Heiko Carstens
2009-08-31 12:43 ` [patch 7/9] spinlock: allow inlined spinlocks Heiko Carstens
2009-08-31 12:43   ` Heiko Carstens
2009-08-31 17:08   ` [tip:core/locking] locking: Allow arch-inlined spinlocks tip-bot for Heiko Carstens
2009-08-31 17:08     ` tip-bot for Heiko Carstens
2009-08-31 12:43 ` [patch 8/9] spinlock: simplify inlining Heiko Carstens
2009-08-31 12:43   ` Heiko Carstens
2009-08-31 17:08   ` [tip:core/locking] locking: Simplify spinlock inlining tip-bot for Heiko Carstens
2009-08-31 12:43 ` [patch 9/9] spinlock: inline code for all locking variants on s390 Heiko Carstens
2009-08-31 12:43   ` Heiko Carstens
2009-08-31 17:08   ` [tip:core/locking] locking: Inline spinlock " tip-bot for Heiko Carstens
2009-08-31 15:56 ` [patch 0/9] Allow inlined spinlocks again V6 Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090831124415.918799705@de.ibm.com \
    --to=heiko.carstens@de.ibm.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=ehrhardt@linux.vnet.ibm.com \
    --cc=horsth@linux.vnet.ibm.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=nickpiggin@yahoo.com.au \
    --cc=schwidefsky@de.ibm.com \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).