Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2005-01-20 16:19:09 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-20 16:19:09 -0800
commit74304a260ae29c347a4b896f687f57fb2aece758 (patch)
tree0b56e3029a5fe8858f783e79c5b61b8a5e5cd1e7
parentb8207c12a4480fa503f1bc1c75466e188a406290 (diff)
[PATCH] Lock initializer cleanup: SPARC
Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/sparc/kernel/auxio.c2
-rw-r--r--arch/sparc/kernel/irq.c2
-rw-r--r--arch/sparc/kernel/process.c2
-rw-r--r--arch/sparc/kernel/semaphore.c2
-rw-r--r--arch/sparc/kernel/smp.c2
-rw-r--r--arch/sparc/kernel/sun4d_irq.c2
-rw-r--r--arch/sparc/kernel/sun4d_smp.c4
-rw-r--r--arch/sparc/kernel/sun4m_smp.c2
-rw-r--r--arch/sparc/kernel/time.c4
-rw-r--r--arch/sparc/mm/srmmu.c2
-rw-r--r--arch/sparc/prom/misc.c2
11 files changed, 13 insertions, 13 deletions
diff --git a/arch/sparc/kernel/auxio.c b/arch/sparc/kernel/auxio.c
index 4bb41a1a3821..cbdf3c2b3a4d 100644
--- a/arch/sparc/kernel/auxio.c
+++ b/arch/sparc/kernel/auxio.c
@@ -18,7 +18,7 @@
* in entry.S::floppy_tdone
*/
void __iomem *auxio_register = NULL;
-static spinlock_t auxio_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(auxio_lock);
void __init auxio_probe(void)
{
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c
index 4e0ed320d225..410b9a72aba9 100644
--- a/arch/sparc/kernel/irq.c
+++ b/arch/sparc/kernel/irq.c
@@ -159,7 +159,7 @@ struct irqaction *irq_action[NR_IRQS] = {
};
/* Used to protect the IRQ action lists */
-spinlock_t irq_action_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(irq_action_lock);
int show_interrupts(struct seq_file *p, void *v)
{
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c
index 24dd35ae5061..0915e41b1e53 100644
--- a/arch/sparc/kernel/process.c
+++ b/arch/sparc/kernel/process.c
@@ -198,7 +198,7 @@ void machine_power_off(void)
EXPORT_SYMBOL(machine_power_off);
-static spinlock_t sparc_backtrace_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sparc_backtrace_lock);
void __show_backtrace(unsigned long fp)
{
diff --git a/arch/sparc/kernel/semaphore.c b/arch/sparc/kernel/semaphore.c
index 77e63b92ca30..0c37c1a7cd7e 100644
--- a/arch/sparc/kernel/semaphore.c
+++ b/arch/sparc/kernel/semaphore.c
@@ -44,7 +44,7 @@ void __up(struct semaphore *sem)
wake_up(&sem->wait);
}
-static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(semaphore_lock);
void __sched __down(struct semaphore * sem)
{
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c
index f11dd14dbe3b..6cd0307a6661 100644
--- a/arch/sparc/kernel/smp.c
+++ b/arch/sparc/kernel/smp.c
@@ -234,7 +234,7 @@ void smp_flush_sig_insns(struct mm_struct *mm, unsigned long insn_addr)
extern unsigned int lvl14_resolution;
/* /proc/profile writes can call this, don't __init it please. */
-static spinlock_t prof_setup_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(prof_setup_lock);
int setup_profiling_timer(unsigned int multiplier)
{
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c
index 81223f882036..52621348a56c 100644
--- a/arch/sparc/kernel/sun4d_irq.c
+++ b/arch/sparc/kernel/sun4d_irq.c
@@ -72,7 +72,7 @@ static int sbus_to_pil[] = {
static int nsbi;
#ifdef CONFIG_SMP
-spinlock_t sun4d_imsk_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(sun4d_imsk_lock);
#endif
int show_sun4d_interrupts(struct seq_file *p, void *v)
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c
index e0487047299c..ea209f056f2f 100644
--- a/arch/sparc/kernel/sun4d_smp.c
+++ b/arch/sparc/kernel/sun4d_smp.c
@@ -300,7 +300,7 @@ static struct smp_funcall {
unsigned char processors_out[NR_CPUS]; /* Set when ipi exited. */
} ccall_info __attribute__((aligned(8)));
-static spinlock_t cross_call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cross_call_lock);
/* Cross calls must be serialized, at least currently. */
void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2,
@@ -397,7 +397,7 @@ void smp4d_message_pass(int target, int msg, unsigned long data, int wait)
SMP_PRINTK(("smp4d_message_pass %d %d %08lx %d\n", target, msg, data, wait));
if (msg == MSG_STOP_CPU && target == MSG_ALL_BUT_SELF) {
unsigned long flags;
- static spinlock_t stop_cpu_lock = SPIN_LOCK_UNLOCKED;
+ static DEFINE_SPINLOCK(stop_cpu_lock);
spin_lock_irqsave(&stop_cpu_lock, flags);
smp4d_stop_cpu_sender = me;
smp4d_cross_call((smpfunc_t)smp4d_stop_cpu, 0, 0, 0, 0, 0);
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c
index 4601d5333944..8e10d9502dd4 100644
--- a/arch/sparc/kernel/sun4m_smp.c
+++ b/arch/sparc/kernel/sun4m_smp.c
@@ -321,7 +321,7 @@ static struct smp_funcall {
unsigned long processors_out[NR_CPUS]; /* Set when ipi exited. */
} ccall_info;
-static spinlock_t cross_call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cross_call_lock);
/* Cross calls must be serialized, at least currently. */
void smp4m_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2,
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c
index f0457026ae76..6486cbf2efe9 100644
--- a/arch/sparc/kernel/time.c
+++ b/arch/sparc/kernel/time.c
@@ -50,9 +50,9 @@ u64 jiffies_64 = INITIAL_JIFFIES;
EXPORT_SYMBOL(jiffies_64);
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtc_lock);
enum sparc_clock_type sp_clock_typ;
-spinlock_t mostek_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(mostek_lock);
void __iomem *mstk48t02_regs = NULL;
static struct mostek48t08 *mstk48t08_regs = NULL;
static int set_rtc_mmss(unsigned long);
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index b873e84215af..97e675c0c7f0 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -88,7 +88,7 @@ ctxd_t *srmmu_ctx_table_phys;
ctxd_t *srmmu_context_table;
int viking_mxcc_present;
-static spinlock_t srmmu_context_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(srmmu_context_spinlock);
int is_hypersparc;
diff --git a/arch/sparc/prom/misc.c b/arch/sparc/prom/misc.c
index 5c7aa0c97f37..c840c2062342 100644
--- a/arch/sparc/prom/misc.c
+++ b/arch/sparc/prom/misc.c
@@ -16,7 +16,7 @@
extern void restore_current(void);
-spinlock_t prom_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(prom_lock);
/* Reset and reboot the machine with the command 'bcommand'. */
void