Commit 74304a26 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Linus Torvalds

[PATCH] Lock initializer cleanup: SPARC

Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b8207c12
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
* in entry.S::floppy_tdone * in entry.S::floppy_tdone
*/ */
void __iomem *auxio_register = NULL; void __iomem *auxio_register = NULL;
static spinlock_t auxio_lock = SPIN_LOCK_UNLOCKED; static DEFINE_SPINLOCK(auxio_lock);
void __init auxio_probe(void) void __init auxio_probe(void)
{ {
......
...@@ -159,7 +159,7 @@ struct irqaction *irq_action[NR_IRQS] = { ...@@ -159,7 +159,7 @@ struct irqaction *irq_action[NR_IRQS] = {
}; };
/* Used to protect the IRQ action lists */ /* 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) int show_interrupts(struct seq_file *p, void *v)
{ {
......
...@@ -198,7 +198,7 @@ void machine_power_off(void) ...@@ -198,7 +198,7 @@ void machine_power_off(void)
EXPORT_SYMBOL(machine_power_off); 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) void __show_backtrace(unsigned long fp)
{ {
......
...@@ -44,7 +44,7 @@ void __up(struct semaphore *sem) ...@@ -44,7 +44,7 @@ void __up(struct semaphore *sem)
wake_up(&sem->wait); wake_up(&sem->wait);
} }
static spinlock_t semaphore_lock = SPIN_LOCK_UNLOCKED; static DEFINE_SPINLOCK(semaphore_lock);
void __sched __down(struct semaphore * sem) void __sched __down(struct semaphore * sem)
{ {
......
...@@ -234,7 +234,7 @@ void smp_flush_sig_insns(struct mm_struct *mm, unsigned long insn_addr) ...@@ -234,7 +234,7 @@ void smp_flush_sig_insns(struct mm_struct *mm, unsigned long insn_addr)
extern unsigned int lvl14_resolution; extern unsigned int lvl14_resolution;
/* /proc/profile writes can call this, don't __init it please. */ /* /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) int setup_profiling_timer(unsigned int multiplier)
{ {
......
...@@ -72,7 +72,7 @@ static int sbus_to_pil[] = { ...@@ -72,7 +72,7 @@ static int sbus_to_pil[] = {
static int nsbi; static int nsbi;
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
spinlock_t sun4d_imsk_lock = SPIN_LOCK_UNLOCKED; DEFINE_SPINLOCK(sun4d_imsk_lock);
#endif #endif
int show_sun4d_interrupts(struct seq_file *p, void *v) int show_sun4d_interrupts(struct seq_file *p, void *v)
......
...@@ -300,7 +300,7 @@ static struct smp_funcall { ...@@ -300,7 +300,7 @@ static struct smp_funcall {
unsigned char processors_out[NR_CPUS]; /* Set when ipi exited. */ unsigned char processors_out[NR_CPUS]; /* Set when ipi exited. */
} ccall_info __attribute__((aligned(8))); } 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. */ /* Cross calls must be serialized, at least currently. */
void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, 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) ...@@ -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)); SMP_PRINTK(("smp4d_message_pass %d %d %08lx %d\n", target, msg, data, wait));
if (msg == MSG_STOP_CPU && target == MSG_ALL_BUT_SELF) { if (msg == MSG_STOP_CPU && target == MSG_ALL_BUT_SELF) {
unsigned long flags; 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); spin_lock_irqsave(&stop_cpu_lock, flags);
smp4d_stop_cpu_sender = me; smp4d_stop_cpu_sender = me;
smp4d_cross_call((smpfunc_t)smp4d_stop_cpu, 0, 0, 0, 0, 0); smp4d_cross_call((smpfunc_t)smp4d_stop_cpu, 0, 0, 0, 0, 0);
......
...@@ -321,7 +321,7 @@ static struct smp_funcall { ...@@ -321,7 +321,7 @@ static struct smp_funcall {
unsigned long processors_out[NR_CPUS]; /* Set when ipi exited. */ unsigned long processors_out[NR_CPUS]; /* Set when ipi exited. */
} ccall_info; } 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. */ /* Cross calls must be serialized, at least currently. */
void smp4m_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, void smp4m_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2,
......
...@@ -50,9 +50,9 @@ u64 jiffies_64 = INITIAL_JIFFIES; ...@@ -50,9 +50,9 @@ u64 jiffies_64 = INITIAL_JIFFIES;
EXPORT_SYMBOL(jiffies_64); EXPORT_SYMBOL(jiffies_64);
spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED; DEFINE_SPINLOCK(rtc_lock);
enum sparc_clock_type sp_clock_typ; enum sparc_clock_type sp_clock_typ;
spinlock_t mostek_lock = SPIN_LOCK_UNLOCKED; DEFINE_SPINLOCK(mostek_lock);
void __iomem *mstk48t02_regs = NULL; void __iomem *mstk48t02_regs = NULL;
static struct mostek48t08 *mstk48t08_regs = NULL; static struct mostek48t08 *mstk48t08_regs = NULL;
static int set_rtc_mmss(unsigned long); static int set_rtc_mmss(unsigned long);
......
...@@ -88,7 +88,7 @@ ctxd_t *srmmu_ctx_table_phys; ...@@ -88,7 +88,7 @@ ctxd_t *srmmu_ctx_table_phys;
ctxd_t *srmmu_context_table; ctxd_t *srmmu_context_table;
int viking_mxcc_present; int viking_mxcc_present;
static spinlock_t srmmu_context_spinlock = SPIN_LOCK_UNLOCKED; static DEFINE_SPINLOCK(srmmu_context_spinlock);
int is_hypersparc; int is_hypersparc;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
extern void restore_current(void); 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'. */ /* Reset and reboot the machine with the command 'bcommand'. */
void void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment