Commit 853151f2 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Linus Torvalds

[PATCH] Lock initializer cleanup: PPC

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 bc03a9c1
No related merge requests found
......@@ -71,7 +71,7 @@ int map_page(unsigned long va, phys_addr_t pa, int flags);
* This is the page table (2MB) covering uncached, DMA consistent allocations
*/
static pte_t *consistent_pte;
static spinlock_t consistent_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(consistent_lock);
/*
* VM region handling support.
......
......@@ -34,7 +34,7 @@
#include <asm/xmon.h>
/* A lock to regulate grabbing the interrupt */
spinlock_t perfmon_lock = SPIN_LOCK_UNLOCKED;
DEFINE_SPINLOCK(perfmon_lock);
#ifdef CONFIG_FSL_BOOKE
static void dummy_perf(struct pt_regs *regs)
......
......@@ -163,7 +163,7 @@ void smp_send_stop(void)
* static memory requirements. It also looks cleaner.
* Stolen from the i386 version.
*/
static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(call_lock);
static struct call_data_struct {
void (*func) (void *info);
......
......@@ -91,7 +91,7 @@ extern unsigned long wall_jiffies;
static long time_offset;
spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
DEFINE_SPINLOCK(rtc_lock);
EXPORT_SYMBOL(rtc_lock);
......
......@@ -72,7 +72,7 @@ void (*debugger_fault_handler)(struct pt_regs *regs);
* Trap & Exception support
*/
spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
DEFINE_SPINLOCK(die_lock);
void die(const char * str, struct pt_regs * fp, long err)
{
......
......@@ -57,7 +57,7 @@ smp_chrp_setup_cpu(int cpu_nr)
do_openpic_setup_cpu();
}
static spinlock_t timebase_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(timebase_lock);
static unsigned int timebase_upper = 0, timebase_lower = 0;
void __devinit
......
......@@ -63,7 +63,7 @@ extern struct device_node *k2_skiplist[2];
* We use a single global lock to protect accesses. Each driver has
* to take care of its own locking
*/
static spinlock_t feature_lock __pmacdata = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(feature_lock __pmacdata);
#define LOCK(flags) spin_lock_irqsave(&feature_lock, flags);
#define UNLOCK(flags) spin_unlock_irqrestore(&feature_lock, flags);
......
......@@ -80,7 +80,7 @@ static volatile unsigned char *nvram_data;
static int nvram_mult, is_core_99;
static int core99_bank = 0;
static int nvram_partitions[3];
static spinlock_t nv_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(nv_lock);
extern int pmac_newworld;
extern int system_running;
......
......@@ -68,7 +68,7 @@ static int max_irqs __pmacdata;
static int max_real_irqs __pmacdata;
static u32 level_mask[4] __pmacdata;
static spinlock_t pmac_pic_lock __pmacdata = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(pmac_pic_lock __pmacdata);
#define GATWICK_IRQ_POOL_SIZE 10
......
......@@ -68,7 +68,7 @@ static void sbc82xx_time_init(void)
static volatile char *sbc82xx_i8259_map;
static char sbc82xx_i8259_mask = 0xff;
static spinlock_t sbc82xx_i8259_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(sbc82xx_i8259_lock);
static void sbc82xx_i8259_mask_and_ack_irq(unsigned int irq_nr)
{
......
......@@ -10,7 +10,7 @@ unsigned char cached_8259[2] = { 0xff, 0xff };
#define cached_A1 (cached_8259[0])
#define cached_21 (cached_8259[1])
static spinlock_t i8259_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(i8259_lock);
int i8259_pic_irq_offset;
......
......@@ -531,7 +531,7 @@ void openpic_reset_processor_phys(u_int mask)
}
#if defined(CONFIG_SMP) || defined(CONFIG_PM)
static spinlock_t openpic_setup_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(openpic_setup_lock);
#endif
#ifdef CONFIG_SMP
......
......@@ -386,7 +386,7 @@ static void openpic2_set_spurious(u_int vec)
vec);
}
static spinlock_t openpic2_setup_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(openpic2_setup_lock);
/*
* Initialize a timer interrupt (and disable it)
......
......@@ -1397,7 +1397,7 @@ print_properties(struct device_node *np)
}
#endif
static spinlock_t rtas_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(rtas_lock);
/* this can be called after setup -- Cort */
int __openfirmware
......
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