All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 00/16] Remove old style lock initializers
@ 2009-11-06 22:41 Thomas Gleixner
  2009-11-06 22:41 ` [patch 01/16] arm: Replace old style lock initializer Thomas Gleixner
                   ` (15 more replies)
  0 siblings, 16 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra

The old style lock initializers SPIN_LOCK_UNLOCKED and
RW_LOCK_UNLOCKED are deprecated for several years. The series fixes
the remaining users and removes the defines.

Thanks,

	tglx


^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 01/16] arm: Replace old style lock initializer
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
@ 2009-11-06 22:41 ` Thomas Gleixner
  2009-11-06 22:41 ` [patch 02/16] mips: Replace old style spin " Thomas Gleixner
                   ` (14 subsequent siblings)
  15 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, patches, Russell King

[-- Attachment #1: arm-remove-old-style-lock-init.patch --]
[-- Type: text/plain, Size: 1043 bytes --]

SPIN_LOCK_UNLOCKED is deprecated. Initialize the per cpu ipi locks via
spin_lock_init.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: patches@arm.linux.org.uk
Cc: Russell King <rmk+kernel@arm.linux.org.uk>

---
 arch/arm/kernel/smp.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Index: linux-2.6/arch/arm/kernel/smp.c
===================================================================
--- linux-2.6.orig/arch/arm/kernel/smp.c
+++ linux-2.6/arch/arm/kernel/smp.c
@@ -55,9 +55,7 @@ struct ipi_data {
 	unsigned long bits;
 };
 
-static DEFINE_PER_CPU(struct ipi_data, ipi_data) = {
-	.lock	= SPIN_LOCK_UNLOCKED,
-};
+static DEFINE_PER_CPU(struct ipi_data, ipi_data);
 
 enum ipi_msg_type {
 	IPI_TIMER,
@@ -329,6 +327,9 @@ void __init smp_prepare_boot_cpu(void)
 	unsigned int cpu = smp_processor_id();
 
 	per_cpu(cpu_data, cpu).idle = current;
+
+	for_each_possible_cpu(cpu)
+		spin_lock_init(&per_cpu(ipi_data, cpu).lock);
 }
 
 static void send_ipi_message(const struct cpumask *mask, enum ipi_msg_type msg)



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 02/16] mips: Replace old style spin lock initializer
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
  2009-11-06 22:41 ` [patch 01/16] arm: Replace old style lock initializer Thomas Gleixner
@ 2009-11-06 22:41 ` Thomas Gleixner
  2009-11-06 22:41 ` [patch 03/16] net: Replace old style " Thomas Gleixner
                   ` (13 subsequent siblings)
  15 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Ralf Baechle

[-- Attachment #1: mips-remove-old-style-lock-init.patch --]
[-- Type: text/plain, Size: 877 bytes --]

SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
---
 arch/mips/kernel/vpe.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/mips/kernel/vpe.c
===================================================================
--- linux-2.6.orig/arch/mips/kernel/vpe.c
+++ linux-2.6/arch/mips/kernel/vpe.c
@@ -149,9 +149,9 @@ struct {
 	spinlock_t tc_list_lock;
 	struct list_head tc_list;	/* Thread contexts */
 } vpecontrol = {
-	.vpe_list_lock	= SPIN_LOCK_UNLOCKED,
+	.vpe_list_lock	= __SPIN_LOCK_UNLOCKED(vpecontrol.vpe_list_lock),
 	.vpe_list	= LIST_HEAD_INIT(vpecontrol.vpe_list),
-	.tc_list_lock	= SPIN_LOCK_UNLOCKED,
+	.tc_list_lock	= __SPIN_LOCK_UNLOCKED(vpecontrol.tc_list_lock),
 	.tc_list	= LIST_HEAD_INIT(vpecontrol.tc_list)
 };
 



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 03/16] net: Replace old style lock initializer
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
  2009-11-06 22:41 ` [patch 01/16] arm: Replace old style lock initializer Thomas Gleixner
  2009-11-06 22:41 ` [patch 02/16] mips: Replace old style spin " Thomas Gleixner
@ 2009-11-06 22:41 ` Thomas Gleixner
  2009-11-07  6:17   ` David Miller
  2009-11-06 22:41 ` [patch 04/16] cred: " Thomas Gleixner
                   ` (12 subsequent siblings)
  15 siblings, 1 reply; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, netdev, David S. Miller

[-- Attachment #1: net-replace-old-style-lock-init.patch --]
[-- Type: text/plain, Size: 749 bytes --]

SPIN_LOCK_UNLOCKED is deprecated. Use DEFINE_SPINLOCK instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: netdev@vger.kernel.org
Cc: David S. Miller <davem@davemloft.net>
---
 net/core/drop_monitor.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/net/core/drop_monitor.c
===================================================================
--- linux-2.6.orig/net/core/drop_monitor.c
+++ linux-2.6/net/core/drop_monitor.c
@@ -41,7 +41,7 @@ static void send_dm_alert(struct work_st
  * netlink alerts
  */
 static int trace_state = TRACE_OFF;
-static spinlock_t trace_state_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(trace_state_lock);
 
 struct per_cpu_dm_data {
 	struct work_struct dm_alert_work;



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 04/16] cred: Replace old style lock initializer
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
                   ` (2 preceding siblings ...)
  2009-11-06 22:41 ` [patch 03/16] net: Replace old style " Thomas Gleixner
@ 2009-11-06 22:41 ` Thomas Gleixner
  2009-11-06 22:41 ` [patch 05/16] pci: " Thomas Gleixner
                   ` (11 subsequent siblings)
  15 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra

[-- Attachment #1: cred-replace-old-style-lock-init.patch --]
[-- Type: text/plain, Size: 597 bytes --]

SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 kernel/cred.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/kernel/cred.c
===================================================================
--- linux-2.6.orig/kernel/cred.c
+++ linux-2.6/kernel/cred.c
@@ -39,7 +39,7 @@ static struct kmem_cache *cred_jar;
 static struct thread_group_cred init_tgcred = {
 	.usage	= ATOMIC_INIT(2),
 	.tgid	= 0,
-	.lock	= SPIN_LOCK_UNLOCKED,
+	.lock	= __SPIN_LOCK_UNLOCKED(init_tgcred.lock),
 };
 #endif
 



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 05/16] pci: Replace old style lock initializer
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
                   ` (3 preceding siblings ...)
  2009-11-06 22:41 ` [patch 04/16] cred: " Thomas Gleixner
@ 2009-11-06 22:41 ` Thomas Gleixner
  2009-11-06 23:06   ` Jesse Barnes
  2009-11-06 22:41 ` [patch 06/16] sound: " Thomas Gleixner
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Jesse Barnes

[-- Attachment #1: pci-replace-old-style-lock-init.patch --]
[-- Type: text/plain, Size: 844 bytes --]

SPIN_LOCK_UNLOCKED is deprecated. Use DEFINE_SPINLOCK instead.

Make the lock static while at it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/pci/pci.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/pci/pci.c
===================================================================
--- linux-2.6.orig/drivers/pci/pci.c
+++ linux-2.6/drivers/pci/pci.c
@@ -2590,7 +2590,7 @@ int pci_set_vga_state(struct pci_dev *de
 
 #define RESOURCE_ALIGNMENT_PARAM_SIZE COMMAND_LINE_SIZE
 static char resource_alignment_param[RESOURCE_ALIGNMENT_PARAM_SIZE] = {0};
-spinlock_t resource_alignment_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(resource_alignment_lock);
 
 /**
  * pci_specified_resource_alignment - get resource alignment specified by user.



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 06/16] sound: Replace old style lock initializer
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
                   ` (4 preceding siblings ...)
  2009-11-06 22:41 ` [patch 05/16] pci: " Thomas Gleixner
@ 2009-11-06 22:41 ` Thomas Gleixner
  2009-11-07  9:20   ` Takashi Iwai
  2009-11-06 22:41 ` [patch 07/16] um: " Thomas Gleixner
                   ` (9 subsequent siblings)
  15 siblings, 1 reply; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Takashi Iwai

[-- Attachment #1: sound-oss-replace-old-style-lock-init.patch --]
[-- Type: text/plain, Size: 774 bytes --]

SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Takashi Iwai <tiwai@suse.de>
---
 sound/oss/dmasound/dmasound_core.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Index: linux-2.6/sound/oss/dmasound/dmasound_core.c
===================================================================
--- linux-2.6.orig/sound/oss/dmasound/dmasound_core.c
+++ linux-2.6/sound/oss/dmasound/dmasound_core.c
@@ -219,7 +219,9 @@ static int shared_resources_initialised;
      *  Mid level stuff
      */
 
-struct sound_settings dmasound = { .lock = SPIN_LOCK_UNLOCKED };
+struct sound_settings dmasound = {
+	.lock = __SPIN_LOCK_UNLOCKED(dmasound.lock)
+};
 
 static inline void sound_silence(void)
 {



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 07/16] um: Replace old style lock initializer
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
                   ` (5 preceding siblings ...)
  2009-11-06 22:41 ` [patch 06/16] sound: " Thomas Gleixner
@ 2009-11-06 22:41 ` Thomas Gleixner
  2009-11-09  2:13   ` Américo Wang
  2009-11-06 22:41   ` Thomas Gleixner
                   ` (8 subsequent siblings)
  15 siblings, 1 reply; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Jeff Dike

[-- Attachment #1: um-replace-old-style-lock-init.patch --]
[-- Type: text/plain, Size: 888 bytes --]

SPIN_LOCK_UNLOCKED is deprecated since quite a while. Runtime init the
locks instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jeff Dike <jdike@addtoit.com>
---
 arch/um/drivers/ubd_kern.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/um/drivers/ubd_kern.c
===================================================================
--- linux-2.6.orig/arch/um/drivers/ubd_kern.c
+++ linux-2.6/arch/um/drivers/ubd_kern.c
@@ -180,7 +180,6 @@ struct ubd {
 	.no_cow =               0, \
 	.shared =		0, \
 	.cow =			DEFAULT_COW, \
-	.lock =			SPIN_LOCK_UNLOCKED,	\
 	.request =		NULL, \
 	.start_sg =		0, \
 	.end_sg =		0, \
@@ -838,6 +837,7 @@ static int ubd_add(int n, char **error_o
 
 	ubd_dev->size = ROUND_BLOCK(ubd_dev->size);
 
+	spin_lock_init(&ubd_dev->lock);
 	INIT_LIST_HEAD(&ubd_dev->restart);
 	sg_init_table(ubd_dev->sg, MAX_SG);
 



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 08/16] sparc: Make atomic locks raw
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
@ 2009-11-06 22:41   ` Thomas Gleixner
  2009-11-06 22:41 ` [patch 02/16] mips: Replace old style spin " Thomas Gleixner
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, David S. Miller, sparclinux

[-- Attachment #1: sparc-make-atomic-locks-raw.patch --]
[-- Type: text/plain, Size: 4076 bytes --]

SPIN_LOCK_UNLOCKED is deprecated and the locks which protect the
atomic operations have no dependency on other locks and the code is
well tested so the conversion to a raw lock is safe.

Make the lock array static while at it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
---
 arch/sparc/lib/atomic32.c |   36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

Index: linux-2.6/arch/sparc/lib/atomic32.c
===================================================================
--- linux-2.6.orig/arch/sparc/lib/atomic32.c
+++ linux-2.6/arch/sparc/lib/atomic32.c
@@ -15,8 +15,8 @@
 #define ATOMIC_HASH_SIZE	4
 #define ATOMIC_HASH(a)	(&__atomic_hash[(((unsigned long)a)>>8) & (ATOMIC_HASH_SIZE-1)])
 
-spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] = {
-	[0 ... (ATOMIC_HASH_SIZE-1)] = SPIN_LOCK_UNLOCKED
+static raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] = {
+	[0 ... (ATOMIC_HASH_SIZE-1)] = __RAW_SPIN_LOCK_UNLOCKED
 };
 
 #else /* SMP */
@@ -31,11 +31,11 @@ int __atomic_add_return(int i, atomic_t 
 {
 	int ret;
 	unsigned long flags;
-	spin_lock_irqsave(ATOMIC_HASH(v), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(v), flags);
 
 	ret = (v->counter += i);
 
-	spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
 	return ret;
 }
 EXPORT_SYMBOL(__atomic_add_return);
@@ -45,12 +45,12 @@ int atomic_cmpxchg(atomic_t *v, int old,
 	int ret;
 	unsigned long flags;
 
-	spin_lock_irqsave(ATOMIC_HASH(v), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(v), flags);
 	ret = v->counter;
 	if (likely(ret == old))
 		v->counter = new;
 
-	spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
 	return ret;
 }
 EXPORT_SYMBOL(atomic_cmpxchg);
@@ -60,11 +60,11 @@ int atomic_add_unless(atomic_t *v, int a
 	int ret;
 	unsigned long flags;
 
-	spin_lock_irqsave(ATOMIC_HASH(v), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(v), flags);
 	ret = v->counter;
 	if (ret != u)
 		v->counter += a;
-	spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
 	return ret != u;
 }
 EXPORT_SYMBOL(atomic_add_unless);
@@ -74,9 +74,9 @@ void atomic_set(atomic_t *v, int i)
 {
 	unsigned long flags;
 
-	spin_lock_irqsave(ATOMIC_HASH(v), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(v), flags);
 	v->counter = i;
-	spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
 }
 EXPORT_SYMBOL(atomic_set);
 
@@ -84,10 +84,10 @@ unsigned long ___set_bit(unsigned long *
 {
 	unsigned long old, flags;
 
-	spin_lock_irqsave(ATOMIC_HASH(addr), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(addr), flags);
 	old = *addr;
 	*addr = old | mask;
-	spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
 
 	return old & mask;
 }
@@ -97,10 +97,10 @@ unsigned long ___clear_bit(unsigned long
 {
 	unsigned long old, flags;
 
-	spin_lock_irqsave(ATOMIC_HASH(addr), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(addr), flags);
 	old = *addr;
 	*addr = old & ~mask;
-	spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
 
 	return old & mask;
 }
@@ -110,10 +110,10 @@ unsigned long ___change_bit(unsigned lon
 {
 	unsigned long old, flags;
 
-	spin_lock_irqsave(ATOMIC_HASH(addr), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(addr), flags);
 	old = *addr;
 	*addr = old ^ mask;
-	spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
 
 	return old & mask;
 }
@@ -124,10 +124,10 @@ unsigned long __cmpxchg_u32(volatile u32
 	unsigned long flags;
 	u32 prev;
 
-	spin_lock_irqsave(ATOMIC_HASH(ptr), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(ptr), flags);
 	if ((prev = *ptr) == old)
 		*ptr = new;
-	spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags);
 
 	return (unsigned long)prev;
 }



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 08/16] sparc: Make atomic locks raw
@ 2009-11-06 22:41   ` Thomas Gleixner
  0 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, David S. Miller, sparclinux

SPIN_LOCK_UNLOCKED is deprecated and the locks which protect the
atomic operations have no dependency on other locks and the code is
well tested so the conversion to a raw lock is safe.

Make the lock array static while at it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
---
 arch/sparc/lib/atomic32.c |   36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

Index: linux-2.6/arch/sparc/lib/atomic32.c
=================================--- linux-2.6.orig/arch/sparc/lib/atomic32.c
+++ linux-2.6/arch/sparc/lib/atomic32.c
@@ -15,8 +15,8 @@
 #define ATOMIC_HASH_SIZE	4
 #define ATOMIC_HASH(a)	(&__atomic_hash[(((unsigned long)a)>>8) & (ATOMIC_HASH_SIZE-1)])
 
-spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] = {
-	[0 ... (ATOMIC_HASH_SIZE-1)] = SPIN_LOCK_UNLOCKED
+static raw_spinlock_t __atomic_hash[ATOMIC_HASH_SIZE] = {
+	[0 ... (ATOMIC_HASH_SIZE-1)] = __RAW_SPIN_LOCK_UNLOCKED
 };
 
 #else /* SMP */
@@ -31,11 +31,11 @@ int __atomic_add_return(int i, atomic_t 
 {
 	int ret;
 	unsigned long flags;
-	spin_lock_irqsave(ATOMIC_HASH(v), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(v), flags);
 
 	ret = (v->counter += i);
 
-	spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
 	return ret;
 }
 EXPORT_SYMBOL(__atomic_add_return);
@@ -45,12 +45,12 @@ int atomic_cmpxchg(atomic_t *v, int old,
 	int ret;
 	unsigned long flags;
 
-	spin_lock_irqsave(ATOMIC_HASH(v), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(v), flags);
 	ret = v->counter;
 	if (likely(ret = old))
 		v->counter = new;
 
-	spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
 	return ret;
 }
 EXPORT_SYMBOL(atomic_cmpxchg);
@@ -60,11 +60,11 @@ int atomic_add_unless(atomic_t *v, int a
 	int ret;
 	unsigned long flags;
 
-	spin_lock_irqsave(ATOMIC_HASH(v), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(v), flags);
 	ret = v->counter;
 	if (ret != u)
 		v->counter += a;
-	spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
 	return ret != u;
 }
 EXPORT_SYMBOL(atomic_add_unless);
@@ -74,9 +74,9 @@ void atomic_set(atomic_t *v, int i)
 {
 	unsigned long flags;
 
-	spin_lock_irqsave(ATOMIC_HASH(v), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(v), flags);
 	v->counter = i;
-	spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
 }
 EXPORT_SYMBOL(atomic_set);
 
@@ -84,10 +84,10 @@ unsigned long ___set_bit(unsigned long *
 {
 	unsigned long old, flags;
 
-	spin_lock_irqsave(ATOMIC_HASH(addr), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(addr), flags);
 	old = *addr;
 	*addr = old | mask;
-	spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
 
 	return old & mask;
 }
@@ -97,10 +97,10 @@ unsigned long ___clear_bit(unsigned long
 {
 	unsigned long old, flags;
 
-	spin_lock_irqsave(ATOMIC_HASH(addr), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(addr), flags);
 	old = *addr;
 	*addr = old & ~mask;
-	spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
 
 	return old & mask;
 }
@@ -110,10 +110,10 @@ unsigned long ___change_bit(unsigned lon
 {
 	unsigned long old, flags;
 
-	spin_lock_irqsave(ATOMIC_HASH(addr), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(addr), flags);
 	old = *addr;
 	*addr = old ^ mask;
-	spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(addr), flags);
 
 	return old & mask;
 }
@@ -124,10 +124,10 @@ unsigned long __cmpxchg_u32(volatile u32
 	unsigned long flags;
 	u32 prev;
 
-	spin_lock_irqsave(ATOMIC_HASH(ptr), flags);
+	__raw_spin_lock_irqsave(ATOMIC_HASH(ptr), flags);
 	if ((prev = *ptr) = old)
 		*ptr = new;
-	spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags);
+	__raw_spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags);
 
 	return (unsigned long)prev;
 }



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 09/16] powerpc: Replace old style lock initializer
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
@ 2009-11-06 22:41   ` Thomas Gleixner
  2009-11-06 22:41 ` [patch 02/16] mips: Replace old style spin " Thomas Gleixner
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Benjamin Herrenschmidt, linuxppc-dev

[-- Attachment #1: power-replace-old-style-lock-init.patch --]
[-- Type: text/plain, Size: 1192 bytes --]

SPIN_LOCK_UNLOCKED is deprecated. Init the lock array at runtime
instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
---
 arch/powerpc/platforms/iseries/htab.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/powerpc/platforms/iseries/htab.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/iseries/htab.c
+++ linux-2.6/arch/powerpc/platforms/iseries/htab.c
@@ -19,8 +19,7 @@
 
 #include "call_hpt.h"
 
-static spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp =
-	{ [0 ... 63] = SPIN_LOCK_UNLOCKED};
+static spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp;
 
 /*
  * Very primitive algorithm for picking up a lock
@@ -245,6 +244,11 @@ static void iSeries_hpte_invalidate(unsi
 
 void __init hpte_init_iSeries(void)
 {
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(iSeries_hlocks); i++)
+		spin_lock_init(&iSeries_hlocks[i]);
+
 	ppc_md.hpte_invalidate	= iSeries_hpte_invalidate;
 	ppc_md.hpte_updatepp	= iSeries_hpte_updatepp;
 	ppc_md.hpte_updateboltedpp = iSeries_hpte_updateboltedpp;



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 09/16] powerpc: Replace old style lock initializer
@ 2009-11-06 22:41   ` Thomas Gleixner
  0 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
  To: LKML; +Cc: Peter Zijlstra, Ingo Molnar, linuxppc-dev

SPIN_LOCK_UNLOCKED is deprecated. Init the lock array at runtime
instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
---
 arch/powerpc/platforms/iseries/htab.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/powerpc/platforms/iseries/htab.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/iseries/htab.c
+++ linux-2.6/arch/powerpc/platforms/iseries/htab.c
@@ -19,8 +19,7 @@
 
 #include "call_hpt.h"
 
-static spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp =
-	{ [0 ... 63] = SPIN_LOCK_UNLOCKED};
+static spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp;
 
 /*
  * Very primitive algorithm for picking up a lock
@@ -245,6 +244,11 @@ static void iSeries_hpte_invalidate(unsi
 
 void __init hpte_init_iSeries(void)
 {
+	int i;
+
+	for (i = 0; i < ARRAY_SIZE(iSeries_hlocks); i++)
+		spin_lock_init(&iSeries_hlocks[i]);
+
 	ppc_md.hpte_invalidate	= iSeries_hpte_invalidate;
 	ppc_md.hpte_updatepp	= iSeries_hpte_updatepp;
 	ppc_md.hpte_updateboltedpp = iSeries_hpte_updateboltedpp;

^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 10/16] parisc: Replace old style lock init
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
@ 2009-11-06 22:41   ` Thomas Gleixner
  2009-11-06 22:41 ` [patch 02/16] mips: Replace old style spin " Thomas Gleixner
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Kyle McMartin, linux-parisc

SPIN_LOCK_UNLOCKED is deprecated. Init the per cpu locks at runtime
instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: linux-parisc@vger.kernel.org
---
 arch/parisc/kernel/smp.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Index: linux-2.6/arch/parisc/kernel/smp.c
===================================================================
--- linux-2.6.orig/arch/parisc/kernel/smp.c
+++ linux-2.6/arch/parisc/kernel/smp.c
@@ -60,8 +60,6 @@ static int smp_debug_lvl = 0;
 #define smp_debug(lvl, ...)	do { } while(0)
 #endif /* DEBUG_SMP */
 
-DEFINE_SPINLOCK(smp_lock);
-
 volatile struct task_struct *smp_init_current_idle_task;
 
 /* track which CPU is booting */
@@ -69,7 +67,7 @@ static volatile int cpu_now_booting __cp
 
 static int parisc_max_cpus __cpuinitdata = 1;
 
-DEFINE_PER_CPU(spinlock_t, ipi_lock) = SPIN_LOCK_UNLOCKED;
+static DEFINE_PER_CPU(spinlock_t, ipi_lock);
 
 enum ipi_message_type {
 	IPI_NOP=0,
@@ -438,6 +436,11 @@ void __init smp_prepare_boot_cpu(void)
 */
 void __init smp_prepare_cpus(unsigned int max_cpus)
 {
+	int cpu;
+
+	for_each_possible_cpu(cpu)
+		spin_lock_init(&per_cpu(ipi_lock, cpu));
+
 	init_cpu_present(cpumask_of(0));
 
 	parisc_max_cpus = max_cpus;



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 10/16] parisc: Replace old style lock init
@ 2009-11-06 22:41   ` Thomas Gleixner
  0 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Kyle McMartin, linux-parisc

[-- Attachment #1: parisc-replace-old-style-lock-init.patch --]
[-- Type: text/plain, Size: 1266 bytes --]

SPIN_LOCK_UNLOCKED is deprecated. Init the per cpu locks at runtime
instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: linux-parisc@vger.kernel.org
---
 arch/parisc/kernel/smp.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

Index: linux-2.6/arch/parisc/kernel/smp.c
===================================================================
--- linux-2.6.orig/arch/parisc/kernel/smp.c
+++ linux-2.6/arch/parisc/kernel/smp.c
@@ -60,8 +60,6 @@ static int smp_debug_lvl = 0;
 #define smp_debug(lvl, ...)	do { } while(0)
 #endif /* DEBUG_SMP */
 
-DEFINE_SPINLOCK(smp_lock);
-
 volatile struct task_struct *smp_init_current_idle_task;
 
 /* track which CPU is booting */
@@ -69,7 +67,7 @@ static volatile int cpu_now_booting __cp
 
 static int parisc_max_cpus __cpuinitdata = 1;
 
-DEFINE_PER_CPU(spinlock_t, ipi_lock) = SPIN_LOCK_UNLOCKED;
+static DEFINE_PER_CPU(spinlock_t, ipi_lock);
 
 enum ipi_message_type {
 	IPI_NOP=0,
@@ -438,6 +436,11 @@ void __init smp_prepare_boot_cpu(void)
 */
 void __init smp_prepare_cpus(unsigned int max_cpus)
 {
+	int cpu;
+
+	for_each_possible_cpu(cpu)
+		spin_lock_init(&per_cpu(ipi_lock, cpu));
+
 	init_cpu_present(cpumask_of(0));
 
 	parisc_max_cpus = max_cpus;



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 11/16] alpha: Replace old style lock initializer
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
                   ` (9 preceding siblings ...)
  2009-11-06 22:41   ` Thomas Gleixner
@ 2009-11-06 22:41 ` Thomas Gleixner
  2009-11-06 22:42   ` Thomas Gleixner
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:41 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Richard Henderson, linux-alpha

[-- Attachment #1: alpha-replace-old-style-lock-init.patch --]
[-- Type: text/plain, Size: 769 bytes --]

SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Richard Henderson <rth@twiddle.net>
Cc: linux-alpha@vger.kernel.org
---
 arch/alpha/include/asm/rwsem.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/alpha/include/asm/rwsem.h
===================================================================
--- linux-2.6.orig/arch/alpha/include/asm/rwsem.h
+++ linux-2.6/arch/alpha/include/asm/rwsem.h
@@ -39,7 +39,7 @@ struct rw_semaphore {
 };
 
 #define __RWSEM_INITIALIZER(name) \
-	{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \
+	{ RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock),	\
 	LIST_HEAD_INIT((name).wait_list) }
 
 #define DECLARE_RWSEM(name) \



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 12/16] ia64: Replace old style lock initializer
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
@ 2009-11-06 22:42   ` Thomas Gleixner
  2009-11-06 22:41 ` [patch 02/16] mips: Replace old style spin " Thomas Gleixner
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:42 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Tony Luck, linux-ia64

[-- Attachment #1: ia64-replace-old-style-lock-init.patch --]
[-- Type: text/plain, Size: 833 bytes --]

SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-ia64@vger.kernel.org
---
 arch/ia64/include/asm/rwsem.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/ia64/include/asm/rwsem.h
===================================================================
--- linux-2.6.orig/arch/ia64/include/asm/rwsem.h
+++ linux-2.6/arch/ia64/include/asm/rwsem.h
@@ -47,7 +47,7 @@ struct rw_semaphore {
 #define RWSEM_ACTIVE_WRITE_BIAS		(RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
 
 #define __RWSEM_INITIALIZER(name) \
-	{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \
+	{ RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \
 	  LIST_HEAD_INIT((name).wait_list) }
 
 #define DECLARE_RWSEM(name) \



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 12/16] ia64: Replace old style lock initializer
@ 2009-11-06 22:42   ` Thomas Gleixner
  0 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:42 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Tony Luck, linux-ia64

SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Cc: linux-ia64@vger.kernel.org
---
 arch/ia64/include/asm/rwsem.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/ia64/include/asm/rwsem.h
=================================--- linux-2.6.orig/arch/ia64/include/asm/rwsem.h
+++ linux-2.6/arch/ia64/include/asm/rwsem.h
@@ -47,7 +47,7 @@ struct rw_semaphore {
 #define RWSEM_ACTIVE_WRITE_BIAS		(RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
 
 #define __RWSEM_INITIALIZER(name) \
-	{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \
+	{ RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \
 	  LIST_HEAD_INIT((name).wait_list) }
 
 #define DECLARE_RWSEM(name) \



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 13/16] sh: Replace old style lock initializer
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
@ 2009-11-06 22:42   ` Thomas Gleixner
  2009-11-06 22:41 ` [patch 02/16] mips: Replace old style spin " Thomas Gleixner
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:42 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Paul Mundt, linux-sh

SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org
---
 arch/sh/include/asm/rwsem.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/sh/include/asm/rwsem.h
=================================--- linux-2.6.orig/arch/sh/include/asm/rwsem.h
+++ linux-2.6/arch/sh/include/asm/rwsem.h
@@ -41,7 +41,7 @@ struct rw_semaphore {
 #endif
 
 #define __RWSEM_INITIALIZER(name) \
-	{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \
+	{ RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \
 	  LIST_HEAD_INIT((name).wait_list) \
 	  __RWSEM_DEP_MAP_INIT(name) }
 



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 13/16] sh: Replace old style lock initializer
@ 2009-11-06 22:42   ` Thomas Gleixner
  0 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:42 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Paul Mundt, linux-sh

[-- Attachment #1: sh-replace-old-style-lock-init.patch --]
[-- Type: text/plain, Size: 759 bytes --]

SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: linux-sh@vger.kernel.org
---
 arch/sh/include/asm/rwsem.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/sh/include/asm/rwsem.h
===================================================================
--- linux-2.6.orig/arch/sh/include/asm/rwsem.h
+++ linux-2.6/arch/sh/include/asm/rwsem.h
@@ -41,7 +41,7 @@ struct rw_semaphore {
 #endif
 
 #define __RWSEM_INITIALIZER(name) \
-	{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \
+	{ RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \
 	  LIST_HEAD_INIT((name).wait_list) \
 	  __RWSEM_DEP_MAP_INIT(name) }
 



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 14/16] sparc: Replace old style lock initializer
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
@ 2009-11-06 22:42   ` Thomas Gleixner
  2009-11-06 22:41 ` [patch 02/16] mips: Replace old style spin " Thomas Gleixner
                     ` (14 subsequent siblings)
  15 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:42 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, David S. Miller, sparclinux

[-- Attachment #1: sparc-replace-old-style-lock-init.patch --]
[-- Type: text/plain, Size: 922 bytes --]

SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
---
 arch/sparc/include/asm/rwsem.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/sparc/include/asm/rwsem.h
===================================================================
--- linux-2.6.orig/arch/sparc/include/asm/rwsem.h
+++ linux-2.6/arch/sparc/include/asm/rwsem.h
@@ -35,8 +35,8 @@ struct rw_semaphore {
 #endif
 
 #define __RWSEM_INITIALIZER(name) \
-{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) \
-  __RWSEM_DEP_MAP_INIT(name) }
+{ RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock),
+  LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) }
 
 #define DECLARE_RWSEM(name) \
 	struct rw_semaphore name = __RWSEM_INITIALIZER(name)



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 14/16] sparc: Replace old style lock initializer
@ 2009-11-06 22:42   ` Thomas Gleixner
  0 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:42 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, David S. Miller, sparclinux

SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
---
 arch/sparc/include/asm/rwsem.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/sparc/include/asm/rwsem.h
=================================--- linux-2.6.orig/arch/sparc/include/asm/rwsem.h
+++ linux-2.6/arch/sparc/include/asm/rwsem.h
@@ -35,8 +35,8 @@ struct rw_semaphore {
 #endif
 
 #define __RWSEM_INITIALIZER(name) \
-{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) \
-  __RWSEM_DEP_MAP_INIT(name) }
+{ RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock),
+  LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) }
 
 #define DECLARE_RWSEM(name) \
 	struct rw_semaphore name = __RWSEM_INITIALIZER(name)



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 15/16] xtensa: Replace old style lock initializer
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
                   ` (13 preceding siblings ...)
  2009-11-06 22:42   ` Thomas Gleixner
@ 2009-11-06 22:42 ` Thomas Gleixner
  2009-11-10  9:34   ` Chris Zankel
  2009-11-06 22:42 ` [patch 16/16] locking: Remove old style lock initializers Thomas Gleixner
  15 siblings, 1 reply; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:42 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra, Chris Zankel

[-- Attachment #1: xtensa-replace-old-style-lock-init.patch --]
[-- Type: text/plain, Size: 740 bytes --]

SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Chris Zankel <chris@zankel.net>
---
 arch/xtensa/include/asm/rwsem.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/arch/xtensa/include/asm/rwsem.h
===================================================================
--- linux-2.6.orig/arch/xtensa/include/asm/rwsem.h
+++ linux-2.6/arch/xtensa/include/asm/rwsem.h
@@ -38,7 +38,7 @@ struct rw_semaphore {
 };
 
 #define __RWSEM_INITIALIZER(name) \
-	{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \
+	{ RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \
 	  LIST_HEAD_INIT((name).wait_list) }
 
 #define DECLARE_RWSEM(name)		\



^ permalink raw reply	[flat|nested] 50+ messages in thread

* [patch 16/16] locking: Remove old style lock initializers
  2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
                   ` (14 preceding siblings ...)
  2009-11-06 22:42 ` [patch 15/16] xtensa: " Thomas Gleixner
@ 2009-11-06 22:42 ` Thomas Gleixner
  15 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-06 22:42 UTC (permalink / raw)
  To: LKML; +Cc: Ingo Molnar, Peter Zijlstra

[-- Attachment #1: locking-remove-oldstyle-lock-initializers.patch --]
[-- Type: text/plain, Size: 1797 bytes --]

SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED have been deprecated for
years. Now the last users are gone. Remove the cruft.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
 include/linux/spinlock.h       |    4 ++--
 include/linux/spinlock_types.h |    9 ---------
 2 files changed, 2 insertions(+), 11 deletions(-)

Index: linux-2.6/include/linux/spinlock.h
===================================================================
--- linux-2.6.orig/include/linux/spinlock.h
+++ linux-2.6/include/linux/spinlock.h
@@ -102,7 +102,7 @@ do {								\
 
 #else
 # define spin_lock_init(lock)					\
-	do { *(lock) = SPIN_LOCK_UNLOCKED; } while (0)
+	do { *(lock) = __SPIN_LOCK_UNLOCKED(lock); } while (0)
 #endif
 
 #ifdef CONFIG_DEBUG_SPINLOCK
@@ -116,7 +116,7 @@ do {								\
 } while (0)
 #else
 # define rwlock_init(lock)					\
-	do { *(lock) = RW_LOCK_UNLOCKED; } while (0)
+	do { *(lock) = __RW_LOCK_UNLOCKED(lock); } while (0)
 #endif
 
 #define spin_is_locked(lock)	__raw_spin_is_locked(&(lock)->raw_lock)
Index: linux-2.6/include/linux/spinlock_types.h
===================================================================
--- linux-2.6.orig/include/linux/spinlock_types.h
+++ linux-2.6/include/linux/spinlock_types.h
@@ -85,15 +85,6 @@ typedef struct {
 				RW_DEP_MAP_INIT(lockname) }
 #endif
 
-/*
- * SPIN_LOCK_UNLOCKED and RW_LOCK_UNLOCKED defeat lockdep state tracking and
- * are hence deprecated.
- * Please use DEFINE_SPINLOCK()/DEFINE_RWLOCK() or
- * __SPIN_LOCK_UNLOCKED()/__RW_LOCK_UNLOCKED() as appropriate.
- */
-#define SPIN_LOCK_UNLOCKED	__SPIN_LOCK_UNLOCKED(old_style_spin_init)
-#define RW_LOCK_UNLOCKED	__RW_LOCK_UNLOCKED(old_style_rw_init)
-
 #define DEFINE_SPINLOCK(x)	spinlock_t x = __SPIN_LOCK_UNLOCKED(x)
 #define DEFINE_RWLOCK(x)	rwlock_t x = __RW_LOCK_UNLOCKED(x)
 



^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 09/16] powerpc: Replace old style lock initializer
  2009-11-06 22:41   ` Thomas Gleixner
@ 2009-11-06 22:55     ` Benjamin Herrenschmidt
  -1 siblings, 0 replies; 50+ messages in thread
From: Benjamin Herrenschmidt @ 2009-11-06 22:55 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Ingo Molnar, Peter Zijlstra, linuxppc-dev

On Fri, 2009-11-06 at 22:41 +0000, Thomas Gleixner wrote:
> plain text document attachment
> (power-replace-old-style-lock-init.patch)
> SPIN_LOCK_UNLOCKED is deprecated. Init the lock array at runtime
> instead.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: linuxppc-dev@ozlabs.org
> ---

Looks reasonable. But iseries can be a bitch, so we do need to test it
on monday.

Cheers,
Ben.

>  arch/powerpc/platforms/iseries/htab.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6/arch/powerpc/platforms/iseries/htab.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/iseries/htab.c
> +++ linux-2.6/arch/powerpc/platforms/iseries/htab.c
> @@ -19,8 +19,7 @@
>  
>  #include "call_hpt.h"
>  
> -static spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp =
> -	{ [0 ... 63] = SPIN_LOCK_UNLOCKED};
> +static spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp;
>  
>  /*
>   * Very primitive algorithm for picking up a lock
> @@ -245,6 +244,11 @@ static void iSeries_hpte_invalidate(unsi
>  
>  void __init hpte_init_iSeries(void)
>  {
> +	int i;
> +
> +	for (i = 0; i < ARRAY_SIZE(iSeries_hlocks); i++)
> +		spin_lock_init(&iSeries_hlocks[i]);
> +
>  	ppc_md.hpte_invalidate	= iSeries_hpte_invalidate;
>  	ppc_md.hpte_updatepp	= iSeries_hpte_updatepp;
>  	ppc_md.hpte_updateboltedpp = iSeries_hpte_updateboltedpp;
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/



^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 09/16] powerpc: Replace old style lock initializer
@ 2009-11-06 22:55     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 50+ messages in thread
From: Benjamin Herrenschmidt @ 2009-11-06 22:55 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Peter Zijlstra, linuxppc-dev, Ingo Molnar, LKML

On Fri, 2009-11-06 at 22:41 +0000, Thomas Gleixner wrote:
> plain text document attachment
> (power-replace-old-style-lock-init.patch)
> SPIN_LOCK_UNLOCKED is deprecated. Init the lock array at runtime
> instead.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Cc: linuxppc-dev@ozlabs.org
> ---

Looks reasonable. But iseries can be a bitch, so we do need to test it
on monday.

Cheers,
Ben.

>  arch/powerpc/platforms/iseries/htab.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> Index: linux-2.6/arch/powerpc/platforms/iseries/htab.c
> ===================================================================
> --- linux-2.6.orig/arch/powerpc/platforms/iseries/htab.c
> +++ linux-2.6/arch/powerpc/platforms/iseries/htab.c
> @@ -19,8 +19,7 @@
>  
>  #include "call_hpt.h"
>  
> -static spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp =
> -	{ [0 ... 63] = SPIN_LOCK_UNLOCKED};
> +static spinlock_t iSeries_hlocks[64] __cacheline_aligned_in_smp;
>  
>  /*
>   * Very primitive algorithm for picking up a lock
> @@ -245,6 +244,11 @@ static void iSeries_hpte_invalidate(unsi
>  
>  void __init hpte_init_iSeries(void)
>  {
> +	int i;
> +
> +	for (i = 0; i < ARRAY_SIZE(iSeries_hlocks); i++)
> +		spin_lock_init(&iSeries_hlocks[i]);
> +
>  	ppc_md.hpte_invalidate	= iSeries_hpte_invalidate;
>  	ppc_md.hpte_updatepp	= iSeries_hpte_updatepp;
>  	ppc_md.hpte_updateboltedpp = iSeries_hpte_updateboltedpp;
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 05/16] pci: Replace old style lock initializer
  2009-11-06 22:41 ` [patch 05/16] pci: " Thomas Gleixner
@ 2009-11-06 23:06   ` Jesse Barnes
  0 siblings, 0 replies; 50+ messages in thread
From: Jesse Barnes @ 2009-11-06 23:06 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Ingo Molnar, Peter Zijlstra

On Fri, 06 Nov 2009 22:41:23 -0000
Thomas Gleixner <tglx@linutronix.de> wrote:

> SPIN_LOCK_UNLOCKED is deprecated. Use DEFINE_SPINLOCK instead.
> 
> Make the lock static while at it.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> ---
>  drivers/pci/pci.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6/drivers/pci/pci.c
> ===================================================================
> --- linux-2.6.orig/drivers/pci/pci.c
> +++ linux-2.6/drivers/pci/pci.c
> @@ -2590,7 +2590,7 @@ int pci_set_vga_state(struct pci_dev *de
>  
>  #define RESOURCE_ALIGNMENT_PARAM_SIZE COMMAND_LINE_SIZE
>  static char resource_alignment_param[RESOURCE_ALIGNMENT_PARAM_SIZE]
> = {0}; -spinlock_t resource_alignment_lock = SPIN_LOCK_UNLOCKED;
> +static DEFINE_SPINLOCK(resource_alignment_lock);
>  
>  /**
>   * pci_specified_resource_alignment - get resource alignment
> specified by user.

Applied to my linux-next branch, thanks.

-- 
Jesse Barnes, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 08/16] sparc: Make atomic locks raw
  2009-11-06 22:41   ` Thomas Gleixner
@ 2009-11-07  6:16     ` David Miller
  -1 siblings, 0 replies; 50+ messages in thread
From: David Miller @ 2009-11-07  6:16 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, mingo, peterz, sparclinux

From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 06 Nov 2009 22:41:39 -0000

> SPIN_LOCK_UNLOCKED is deprecated and the locks which protect the
> atomic operations have no dependency on other locks and the code is
> well tested so the conversion to a raw lock is safe.
> 
> Make the lock array static while at it.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Applied to sparc-next-2.6, thanks!

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 08/16] sparc: Make atomic locks raw
@ 2009-11-07  6:16     ` David Miller
  0 siblings, 0 replies; 50+ messages in thread
From: David Miller @ 2009-11-07  6:16 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, mingo, peterz, sparclinux

From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 06 Nov 2009 22:41:39 -0000

> SPIN_LOCK_UNLOCKED is deprecated and the locks which protect the
> atomic operations have no dependency on other locks and the code is
> well tested so the conversion to a raw lock is safe.
> 
> Make the lock array static while at it.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Applied to sparc-next-2.6, thanks!

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 03/16] net: Replace old style lock initializer
  2009-11-06 22:41 ` [patch 03/16] net: Replace old style " Thomas Gleixner
@ 2009-11-07  6:17   ` David Miller
  0 siblings, 0 replies; 50+ messages in thread
From: David Miller @ 2009-11-07  6:17 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, mingo, peterz, netdev

From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 06 Nov 2009 22:41:15 -0000

> SPIN_LOCK_UNLOCKED is deprecated. Use DEFINE_SPINLOCK instead.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Applied to net-next-2.6, thanks.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 14/16] sparc: Replace old style lock initializer
  2009-11-06 22:42   ` Thomas Gleixner
@ 2009-11-07  6:18     ` David Miller
  -1 siblings, 0 replies; 50+ messages in thread
From: David Miller @ 2009-11-07  6:18 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, mingo, peterz, sparclinux

From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 06 Nov 2009 22:42:14 -0000

> SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Applied to sparc-next-2.6, thanks.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 14/16] sparc: Replace old style lock initializer
@ 2009-11-07  6:18     ` David Miller
  0 siblings, 0 replies; 50+ messages in thread
From: David Miller @ 2009-11-07  6:18 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, mingo, peterz, sparclinux

From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 06 Nov 2009 22:42:14 -0000

> SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Applied to sparc-next-2.6, thanks.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 14/16] sparc: Replace old style lock initializer
  2009-11-07  6:18     ` David Miller
@ 2009-11-07  6:20       ` David Miller
  -1 siblings, 0 replies; 50+ messages in thread
From: David Miller @ 2009-11-07  6:20 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, mingo, peterz, sparclinux

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: Text/Plain; charset=utf-8, Size: 871 bytes --]

From: David Miller <davem@davemloft.net>
Date: Fri, 06 Nov 2009 22:18:34 -0800 (PST)

> From: Thomas Gleixner <tglx@linutronix.de>
> Date: Fri, 06 Nov 2009 22:42:14 -0000
> 
>> SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.
>> 
>> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> 
> Applied to sparc-next-2.6, thanks.

This breaks the build:

/home/davem/src/GIT/sparc-next-2.6/arch/sparc/include/asm/rwsem.h:39: error: expected identifier or ‘(’ before ‘{’ token
/home/davem/src/GIT/sparc-next-2.6/arch/sparc/include/asm/rwsem.h:39: error: expected identifier or ‘(’ before ‘}’ token
make[1]: *** [arch/sparc/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 14/16] sparc: Replace old style lock initializer
@ 2009-11-07  6:20       ` David Miller
  0 siblings, 0 replies; 50+ messages in thread
From: David Miller @ 2009-11-07  6:20 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, mingo, peterz, sparclinux

From: David Miller <davem@davemloft.net>
Date: Fri, 06 Nov 2009 22:18:34 -0800 (PST)

> From: Thomas Gleixner <tglx@linutronix.de>
> Date: Fri, 06 Nov 2009 22:42:14 -0000
> 
>> SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.
>> 
>> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> 
> Applied to sparc-next-2.6, thanks.

This breaks the build:

/home/davem/src/GIT/sparc-next-2.6/arch/sparc/include/asm/rwsem.h:39: error: expected identifier or ‘(’ before ‘{’ token
/home/davem/src/GIT/sparc-next-2.6/arch/sparc/include/asm/rwsem.h:39: error: expected identifier or ‘(’ before ‘}’ token
make[1]: *** [arch/sparc/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¬¥ªÜ–)îÇø§¶\x17›¡Ü¨}©ž²Æ zÚ&j:+v‰¨þø\x1e¯ù\x1e®w¥þŠà2ŠÞ™¨è­Ú&¢)ß¡«a¶Úÿÿûàz¿äz¹Þ—ú+ƒùšŽŠÝ¢jÿŠwèþ^[f

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 06/16] sound: Replace old style lock initializer
  2009-11-06 22:41 ` [patch 06/16] sound: " Thomas Gleixner
@ 2009-11-07  9:20   ` Takashi Iwai
  0 siblings, 0 replies; 50+ messages in thread
From: Takashi Iwai @ 2009-11-07  9:20 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Ingo Molnar, Peter Zijlstra

At Fri, 06 Nov 2009 22:41:29 -0000,
Thomas Gleixner wrote:
> 
> SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Takashi Iwai <tiwai@suse.de>

Applied to sound git tree now.  Thanks!


Takashi

> ---
>  sound/oss/dmasound/dmasound_core.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> Index: linux-2.6/sound/oss/dmasound/dmasound_core.c
> ===================================================================
> --- linux-2.6.orig/sound/oss/dmasound/dmasound_core.c
> +++ linux-2.6/sound/oss/dmasound/dmasound_core.c
> @@ -219,7 +219,9 @@ static int shared_resources_initialised;
>       *  Mid level stuff
>       */
>  
> -struct sound_settings dmasound = { .lock = SPIN_LOCK_UNLOCKED };
> +struct sound_settings dmasound = {
> +	.lock = __SPIN_LOCK_UNLOCKED(dmasound.lock)
> +};
>  
>  static inline void sound_silence(void)
>  {
> 
> 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 14/16] sparc: Replace old style lock initializer
  2009-11-07  6:20       ` David Miller
@ 2009-11-07 12:16         ` Thomas Gleixner
  -1 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-07 12:16 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel, mingo, peterz, sparclinux

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1954 bytes --]

On Fri, 6 Nov 2009, David Miller wrote:

> From: David Miller <davem@davemloft.net>
> Date: Fri, 06 Nov 2009 22:18:34 -0800 (PST)
> 
> > From: Thomas Gleixner <tglx@linutronix.de>
> > Date: Fri, 06 Nov 2009 22:42:14 -0000
> > 
> >> SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.
> >> 
> >> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > 
> > Applied to sparc-next-2.6, thanks.
> 
> This breaks the build:
> 
> /home/davem/src/GIT/sparc-next-2.6/arch/sparc/include/asm/rwsem.h:39: error: expected identifier or ‘(’ before ‘{’ token
> /home/davem/src/GIT/sparc-next-2.6/arch/sparc/include/asm/rwsem.h:39: error: expected identifier or ‘(’ before ‘}’ token
> make[1]: *** [arch/sparc/kernel/asm-offsets.s] Error 1
> make: *** [prepare0] Error 2

Darn, I compiled it but the 32bit build does not use that file :)
Working version below.

Thanks,

	tglx
---
Subject: sparc: Replace old style lock initializer
From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 06 Nov 2009 22:06:35 +0100

SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
---
 arch/sparc/include/asm/rwsem.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/sparc/include/asm/rwsem.h
===================================================================
--- linux-2.6.orig/arch/sparc/include/asm/rwsem.h
+++ linux-2.6/arch/sparc/include/asm/rwsem.h
@@ -35,8 +35,8 @@ struct rw_semaphore {
 #endif
 
 #define __RWSEM_INITIALIZER(name) \
-{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) \
-  __RWSEM_DEP_MAP_INIT(name) }
+{ RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \
+  LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) }
 
 #define DECLARE_RWSEM(name) \
 	struct rw_semaphore name = __RWSEM_INITIALIZER(name)
 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 14/16] sparc: Replace old style lock initializer
@ 2009-11-07 12:16         ` Thomas Gleixner
  0 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-07 12:16 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel, mingo, peterz, sparclinux

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1954 bytes --]

On Fri, 6 Nov 2009, David Miller wrote:

> From: David Miller <davem@davemloft.net>
> Date: Fri, 06 Nov 2009 22:18:34 -0800 (PST)
> 
> > From: Thomas Gleixner <tglx@linutronix.de>
> > Date: Fri, 06 Nov 2009 22:42:14 -0000
> > 
> >> SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.
> >> 
> >> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > 
> > Applied to sparc-next-2.6, thanks.
> 
> This breaks the build:
> 
> /home/davem/src/GIT/sparc-next-2.6/arch/sparc/include/asm/rwsem.h:39: error: expected identifier or ‘(’ before ‘{’ token
> /home/davem/src/GIT/sparc-next-2.6/arch/sparc/include/asm/rwsem.h:39: error: expected identifier or ‘(’ before ‘}’ token
> make[1]: *** [arch/sparc/kernel/asm-offsets.s] Error 1
> make: *** [prepare0] Error 2

Darn, I compiled it but the 32bit build does not use that file :)
Working version below.

Thanks,

	tglx
---
Subject: sparc: Replace old style lock initializer
From: Thomas Gleixner <tglx@linutronix.de>
Date: Fri, 06 Nov 2009 22:06:35 +0100

SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: David S. Miller <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
---
 arch/sparc/include/asm/rwsem.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6/arch/sparc/include/asm/rwsem.h
===================================================================
--- linux-2.6.orig/arch/sparc/include/asm/rwsem.h
+++ linux-2.6/arch/sparc/include/asm/rwsem.h
@@ -35,8 +35,8 @@ struct rw_semaphore {
 #endif
 
 #define __RWSEM_INITIALIZER(name) \
-{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) \
-  __RWSEM_DEP_MAP_INIT(name) }
+{ RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \
+  LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) }
 
 #define DECLARE_RWSEM(name) \
 	struct rw_semaphore name = __RWSEM_INITIALIZER(name)
 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 10/16] parisc: Replace old style lock init
  2009-11-06 22:41   ` Thomas Gleixner
  (?)
@ 2009-11-08  5:06   ` Kyle McMartin
  2009-11-08 16:11     ` Thomas Gleixner
  -1 siblings, 1 reply; 50+ messages in thread
From: Kyle McMartin @ 2009-11-08  5:06 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Ingo Molnar, Peter Zijlstra, Kyle McMartin, linux-parisc

On Fri, Nov 06, 2009 at 10:41:51PM -0000, Thomas Gleixner wrote:
> SPIN_LOCK_UNLOCKED is deprecated. Init the per cpu locks at runtime
> instead.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Kyle McMartin <kyle@mcmartin.ca>
> Cc: linux-parisc@vger.kernel.org

applied with one nit.

>  
> -DEFINE_SPINLOCK(smp_lock);
> -

You forgot to mention this was unused. :) Confused me for a while.

cheers, Kyle

>  volatile struct task_struct *smp_init_current_idle_task;
>  
>  /* track which CPU is booting */
> @@ -69,7 +67,7 @@ static volatile int cpu_now_booting __cp
>  
>  static int parisc_max_cpus __cpuinitdata = 1;
>  
> -DEFINE_PER_CPU(spinlock_t, ipi_lock) = SPIN_LOCK_UNLOCKED;
> +static DEFINE_PER_CPU(spinlock_t, ipi_lock);
>  
>  enum ipi_message_type {
>  	IPI_NOP=0,
> @@ -438,6 +436,11 @@ void __init smp_prepare_boot_cpu(void)
>  */
>  void __init smp_prepare_cpus(unsigned int max_cpus)
>  {
> +	int cpu;
> +
> +	for_each_possible_cpu(cpu)
> +		spin_lock_init(&per_cpu(ipi_lock, cpu));
> +
>  	init_cpu_present(cpumask_of(0));
>  
>  	parisc_max_cpus = max_cpus;
> 
> 
> 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 14/16] sparc: Replace old style lock initializer
  2009-11-07 12:16         ` Thomas Gleixner
@ 2009-11-08  6:45           ` David Miller
  -1 siblings, 0 replies; 50+ messages in thread
From: David Miller @ 2009-11-08  6:45 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, mingo, peterz, sparclinux

From: Thomas Gleixner <tglx@linutronix.de>
Date: Sat, 7 Nov 2009 13:16:24 +0100 (CET)

> Darn, I compiled it but the 32bit build does not use that file :)
> Working version below.

Looks a lot better, applied, thanks!

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 14/16] sparc: Replace old style lock initializer
@ 2009-11-08  6:45           ` David Miller
  0 siblings, 0 replies; 50+ messages in thread
From: David Miller @ 2009-11-08  6:45 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, mingo, peterz, sparclinux

From: Thomas Gleixner <tglx@linutronix.de>
Date: Sat, 7 Nov 2009 13:16:24 +0100 (CET)

> Darn, I compiled it but the 32bit build does not use that file :)
> Working version below.

Looks a lot better, applied, thanks!

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 09/16] powerpc: Replace old style lock initializer
  2009-11-06 22:55     ` Benjamin Herrenschmidt
@ 2009-11-08  7:55       ` Stephen Rothwell
  -1 siblings, 0 replies; 50+ messages in thread
From: Stephen Rothwell @ 2009-11-08  7:55 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Thomas Gleixner, Peter Zijlstra, linuxppc-dev, Ingo Molnar, LKML

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

Hi Ben,

On Sat, 07 Nov 2009 09:55:44 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> Looks reasonable. But iseries can be a bitch, so we do need to test it
> on monday.

It should be safe as the spinlocks cannot be access until after the
following ppc_md pointer initialisations are done (and all this happens
before the secondary CPUs are started).

But, you are right that there is nothing like actually testing with
iSeries. :-)

> >  void __init hpte_init_iSeries(void)
> >  {
> > +	int i;
> > +
> > +	for (i = 0; i < ARRAY_SIZE(iSeries_hlocks); i++)
> > +		spin_lock_init(&iSeries_hlocks[i]);
> > +
> >  	ppc_md.hpte_invalidate	= iSeries_hpte_invalidate;
> >  	ppc_md.hpte_updatepp	= iSeries_hpte_updatepp;
> >  	ppc_md.hpte_updateboltedpp = iSeries_hpte_updateboltedpp;

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 09/16] powerpc: Replace old style lock initializer
@ 2009-11-08  7:55       ` Stephen Rothwell
  0 siblings, 0 replies; 50+ messages in thread
From: Stephen Rothwell @ 2009-11-08  7:55 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: Peter Zijlstra, linuxppc-dev, Thomas Gleixner, Ingo Molnar, LKML

[-- Attachment #1: Type: text/plain, Size: 929 bytes --]

Hi Ben,

On Sat, 07 Nov 2009 09:55:44 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> Looks reasonable. But iseries can be a bitch, so we do need to test it
> on monday.

It should be safe as the spinlocks cannot be access until after the
following ppc_md pointer initialisations are done (and all this happens
before the secondary CPUs are started).

But, you are right that there is nothing like actually testing with
iSeries. :-)

> >  void __init hpte_init_iSeries(void)
> >  {
> > +	int i;
> > +
> > +	for (i = 0; i < ARRAY_SIZE(iSeries_hlocks); i++)
> > +		spin_lock_init(&iSeries_hlocks[i]);
> > +
> >  	ppc_md.hpte_invalidate	= iSeries_hpte_invalidate;
> >  	ppc_md.hpte_updatepp	= iSeries_hpte_updatepp;
> >  	ppc_md.hpte_updateboltedpp = iSeries_hpte_updateboltedpp;

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 10/16] parisc: Replace old style lock init
  2009-11-08  5:06   ` Kyle McMartin
@ 2009-11-08 16:11     ` Thomas Gleixner
  0 siblings, 0 replies; 50+ messages in thread
From: Thomas Gleixner @ 2009-11-08 16:11 UTC (permalink / raw)
  To: Kyle McMartin; +Cc: LKML, Ingo Molnar, Peter Zijlstra, linux-parisc

On Sun, 8 Nov 2009, Kyle McMartin wrote:

> On Fri, Nov 06, 2009 at 10:41:51PM -0000, Thomas Gleixner wrote:
> > SPIN_LOCK_UNLOCKED is deprecated. Init the per cpu locks at runtime
> > instead.
> > 
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Kyle McMartin <kyle@mcmartin.ca>
> > Cc: linux-parisc@vger.kernel.org
> 
> applied with one nit.
> 
> >  
> > -DEFINE_SPINLOCK(smp_lock);
> > -
> 
> You forgot to mention this was unused. :) Confused me for a while.

Gah. Wanted to add it to the changelog, but slipped from my mind.

Sorry for the confusion,

	tglx

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 13/16] sh: Replace old style lock initializer
  2009-11-06 22:42   ` Thomas Gleixner
@ 2009-11-09  1:49     ` Paul Mundt
  -1 siblings, 0 replies; 50+ messages in thread
From: Paul Mundt @ 2009-11-09  1:49 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Ingo Molnar, Peter Zijlstra, linux-sh

On Fri, Nov 06, 2009 at 10:42:05PM -0000, Thomas Gleixner wrote:
> SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Paul Mundt <lethal@linux-sh.org>
> Cc: linux-sh@vger.kernel.org

Applied, thanks.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 13/16] sh: Replace old style lock initializer
@ 2009-11-09  1:49     ` Paul Mundt
  0 siblings, 0 replies; 50+ messages in thread
From: Paul Mundt @ 2009-11-09  1:49 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Ingo Molnar, Peter Zijlstra, linux-sh

On Fri, Nov 06, 2009 at 10:42:05PM -0000, Thomas Gleixner wrote:
> SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: Paul Mundt <lethal@linux-sh.org>
> Cc: linux-sh@vger.kernel.org

Applied, thanks.

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 07/16] um: Replace old style lock initializer
  2009-11-06 22:41 ` [patch 07/16] um: " Thomas Gleixner
@ 2009-11-09  2:13   ` Américo Wang
  0 siblings, 0 replies; 50+ messages in thread
From: Américo Wang @ 2009-11-09  2:13 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Ingo Molnar, Peter Zijlstra, Jeff Dike

On Fri, Nov 06, 2009 at 10:41:33PM -0000, Thomas Gleixner wrote:
>SPIN_LOCK_UNLOCKED is deprecated since quite a while. Runtime init the
>locks instead.
>
>Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
>Cc: Jeff Dike <jdike@addtoit.com>

Acked-by: WANG Cong <xiyou.wangcong@gmail.com>

Thanks.

>---
> arch/um/drivers/ubd_kern.c |    2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>Index: linux-2.6/arch/um/drivers/ubd_kern.c
>===================================================================
>--- linux-2.6.orig/arch/um/drivers/ubd_kern.c
>+++ linux-2.6/arch/um/drivers/ubd_kern.c
>@@ -180,7 +180,6 @@ struct ubd {
> 	.no_cow =               0, \
> 	.shared =		0, \
> 	.cow =			DEFAULT_COW, \
>-	.lock =			SPIN_LOCK_UNLOCKED,	\
> 	.request =		NULL, \
> 	.start_sg =		0, \
> 	.end_sg =		0, \
>@@ -838,6 +837,7 @@ static int ubd_add(int n, char **error_o
> 
> 	ubd_dev->size = ROUND_BLOCK(ubd_dev->size);
> 
>+	spin_lock_init(&ubd_dev->lock);
> 	INIT_LIST_HEAD(&ubd_dev->restart);
> 	sg_init_table(ubd_dev->sg, MAX_SG);
> 
>
>
>--
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at  http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at  http://www.tux.org/lkml/

-- 
Live like a child, think like the god.
 

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 09/16] powerpc: Replace old style lock initializer
  2009-11-06 22:55     ` Benjamin Herrenschmidt
@ 2009-11-09  5:15       ` Stephen Rothwell
  -1 siblings, 0 replies; 50+ messages in thread
From: Stephen Rothwell @ 2009-11-09  5:15 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: Benjamin Herrenschmidt, LKML, Ingo Molnar, Peter Zijlstra, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]

Hi Thomas,

On Sat, 07 Nov 2009 09:55:44 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> On Fri, 2009-11-06 at 22:41 +0000, Thomas Gleixner wrote:
> > plain text document attachment
> > (power-replace-old-style-lock-init.patch)
> > SPIN_LOCK_UNLOCKED is deprecated. Init the lock array at runtime
> > instead.
> > 
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: linuxppc-dev@ozlabs.org
> > ---
> 
> Looks reasonable. But iseries can be a bitch, so we do need to test it
> on monday.

Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 09/16] powerpc: Replace old style lock initializer
@ 2009-11-09  5:15       ` Stephen Rothwell
  0 siblings, 0 replies; 50+ messages in thread
From: Stephen Rothwell @ 2009-11-09  5:15 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: Peter Zijlstra, Ingo Molnar, LKML, linuxppc-dev

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]

Hi Thomas,

On Sat, 07 Nov 2009 09:55:44 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
>
> On Fri, 2009-11-06 at 22:41 +0000, Thomas Gleixner wrote:
> > plain text document attachment
> > (power-replace-old-style-lock-init.patch)
> > SPIN_LOCK_UNLOCKED is deprecated. Init the lock array at runtime
> > instead.
> > 
> > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > Cc: linuxppc-dev@ozlabs.org
> > ---
> 
> Looks reasonable. But iseries can be a bitch, so we do need to test it
> on monday.

Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 09/16] powerpc: Replace old style lock initializer
  2009-11-09  5:15       ` Stephen Rothwell
@ 2009-11-09  8:53         ` Benjamin Herrenschmidt
  -1 siblings, 0 replies; 50+ messages in thread
From: Benjamin Herrenschmidt @ 2009-11-09  8:53 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Thomas Gleixner, LKML, Ingo Molnar, Peter Zijlstra, linuxppc-dev

On Mon, 2009-11-09 at 16:15 +1100, Stephen Rothwell wrote:
> Hi Thomas,
> 
> On Sat, 07 Nov 2009 09:55:44 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > On Fri, 2009-11-06 at 22:41 +0000, Thomas Gleixner wrote:
> > > plain text document attachment
> > > (power-replace-old-style-lock-init.patch)
> > > SPIN_LOCK_UNLOCKED is deprecated. Init the lock array at runtime
> > > instead.
> > > 
> > > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > > Cc: linuxppc-dev@ozlabs.org
> > > ---
> > 
> > Looks reasonable. But iseries can be a bitch, so we do need to test it
> > on monday.
> 
> Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>

Thanks Stephen !

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>


^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 09/16] powerpc: Replace old style lock initializer
@ 2009-11-09  8:53         ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 50+ messages in thread
From: Benjamin Herrenschmidt @ 2009-11-09  8:53 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Peter Zijlstra, linuxppc-dev, Thomas Gleixner, Ingo Molnar, LKML

On Mon, 2009-11-09 at 16:15 +1100, Stephen Rothwell wrote:
> Hi Thomas,
> 
> On Sat, 07 Nov 2009 09:55:44 +1100 Benjamin Herrenschmidt <benh@kernel.crashing.org> wrote:
> >
> > On Fri, 2009-11-06 at 22:41 +0000, Thomas Gleixner wrote:
> > > plain text document attachment
> > > (power-replace-old-style-lock-init.patch)
> > > SPIN_LOCK_UNLOCKED is deprecated. Init the lock array at runtime
> > > instead.
> > > 
> > > Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> > > Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > > Cc: linuxppc-dev@ozlabs.org
> > > ---
> > 
> > Looks reasonable. But iseries can be a bitch, so we do need to test it
> > on monday.
> 
> Tested-by: Stephen Rothwell <sfr@canb.auug.org.au>

Thanks Stephen !

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

^ permalink raw reply	[flat|nested] 50+ messages in thread

* Re: [patch 15/16] xtensa: Replace old style lock initializer
  2009-11-06 22:42 ` [patch 15/16] xtensa: " Thomas Gleixner
@ 2009-11-10  9:34   ` Chris Zankel
  0 siblings, 0 replies; 50+ messages in thread
From: Chris Zankel @ 2009-11-10  9:34 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: LKML, Ingo Molnar, Peter Zijlstra

Thomas Gleixner wrote:
> SPIN_LOCK_UNLOCKED is deprecated. Use __SPIN_LOCK_UNLOCKED instead.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Chris Zankel <chris@zankel.net>
> ---
>  arch/xtensa/include/asm/rwsem.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6/arch/xtensa/include/asm/rwsem.h
> ===================================================================
> --- linux-2.6.orig/arch/xtensa/include/asm/rwsem.h
> +++ linux-2.6/arch/xtensa/include/asm/rwsem.h
> @@ -38,7 +38,7 @@ struct rw_semaphore {
>  };
>  
>  #define __RWSEM_INITIALIZER(name) \
> -	{ RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, \
> +	{ RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \
>  	  LIST_HEAD_INIT((name).wait_list) }
>  
>  #define DECLARE_RWSEM(name)		\
> 


^ permalink raw reply	[flat|nested] 50+ messages in thread

end of thread, other threads:[~2009-11-10  9:40 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-06 22:41 [patch 00/16] Remove old style lock initializers Thomas Gleixner
2009-11-06 22:41 ` [patch 01/16] arm: Replace old style lock initializer Thomas Gleixner
2009-11-06 22:41 ` [patch 02/16] mips: Replace old style spin " Thomas Gleixner
2009-11-06 22:41 ` [patch 03/16] net: Replace old style " Thomas Gleixner
2009-11-07  6:17   ` David Miller
2009-11-06 22:41 ` [patch 04/16] cred: " Thomas Gleixner
2009-11-06 22:41 ` [patch 05/16] pci: " Thomas Gleixner
2009-11-06 23:06   ` Jesse Barnes
2009-11-06 22:41 ` [patch 06/16] sound: " Thomas Gleixner
2009-11-07  9:20   ` Takashi Iwai
2009-11-06 22:41 ` [patch 07/16] um: " Thomas Gleixner
2009-11-09  2:13   ` Américo Wang
2009-11-06 22:41 ` [patch 08/16] sparc: Make atomic locks raw Thomas Gleixner
2009-11-06 22:41   ` Thomas Gleixner
2009-11-07  6:16   ` David Miller
2009-11-07  6:16     ` David Miller
2009-11-06 22:41 ` [patch 09/16] powerpc: Replace old style lock initializer Thomas Gleixner
2009-11-06 22:41   ` Thomas Gleixner
2009-11-06 22:55   ` Benjamin Herrenschmidt
2009-11-06 22:55     ` Benjamin Herrenschmidt
2009-11-08  7:55     ` Stephen Rothwell
2009-11-08  7:55       ` Stephen Rothwell
2009-11-09  5:15     ` Stephen Rothwell
2009-11-09  5:15       ` Stephen Rothwell
2009-11-09  8:53       ` Benjamin Herrenschmidt
2009-11-09  8:53         ` Benjamin Herrenschmidt
2009-11-06 22:41 ` [patch 10/16] parisc: Replace old style lock init Thomas Gleixner
2009-11-06 22:41   ` Thomas Gleixner
2009-11-08  5:06   ` Kyle McMartin
2009-11-08 16:11     ` Thomas Gleixner
2009-11-06 22:41 ` [patch 11/16] alpha: Replace old style lock initializer Thomas Gleixner
2009-11-06 22:42 ` [patch 12/16] ia64: " Thomas Gleixner
2009-11-06 22:42   ` Thomas Gleixner
2009-11-06 22:42 ` [patch 13/16] sh: " Thomas Gleixner
2009-11-06 22:42   ` Thomas Gleixner
2009-11-09  1:49   ` Paul Mundt
2009-11-09  1:49     ` Paul Mundt
2009-11-06 22:42 ` [patch 14/16] sparc: " Thomas Gleixner
2009-11-06 22:42   ` Thomas Gleixner
2009-11-07  6:18   ` David Miller
2009-11-07  6:18     ` David Miller
2009-11-07  6:20     ` David Miller
2009-11-07  6:20       ` David Miller
2009-11-07 12:16       ` Thomas Gleixner
2009-11-07 12:16         ` Thomas Gleixner
2009-11-08  6:45         ` David Miller
2009-11-08  6:45           ` David Miller
2009-11-06 22:42 ` [patch 15/16] xtensa: " Thomas Gleixner
2009-11-10  9:34   ` Chris Zankel
2009-11-06 22:42 ` [patch 16/16] locking: Remove old style lock initializers Thomas Gleixner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.