[patch 01/16] arm: Replace old style lock initializer

From: Thomas Gleixner
Date: Fri Nov 06 2009 - 17:41:47 EST


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

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: patches@xxxxxxxxxxxxxxxx
Cc: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>

---
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)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/