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 @@
* 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)
{
......
......@@ -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)
{
......
......@@ -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)
{
......
......@@ -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)
{
......
......@@ -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)
{
......
......@@ -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)
......
......@@ -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);
......
......@@ -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,
......
......@@ -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);
......
......@@ -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;
......
......@@ -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
......
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