Commit a96524e4 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Linus Torvalds

[PATCH] Lock initializer cleanup: PARISC

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 cb542157
...@@ -40,7 +40,7 @@ EXPORT_SYMBOL(dcache_stride); ...@@ -40,7 +40,7 @@ EXPORT_SYMBOL(dcache_stride);
* by software. We put a spinlock around all TLB flushes to * by software. We put a spinlock around all TLB flushes to
* ensure this. * ensure this.
*/ */
spinlock_t pa_tlb_lock = SPIN_LOCK_UNLOCKED; DEFINE_SPINLOCK(pa_tlb_lock);
EXPORT_SYMBOL(pa_tlb_lock); EXPORT_SYMBOL(pa_tlb_lock);
#endif #endif
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
#include <asm/system.h> #include <asm/system.h>
#include <asm/processor.h> /* for boot_cpu_data */ #include <asm/processor.h> /* for boot_cpu_data */
static spinlock_t pdc_lock = SPIN_LOCK_UNLOCKED; static DEFINE_SPINLOCK(pdc_lock);
static unsigned long pdc_result[32] __attribute__ ((aligned (8))); static unsigned long pdc_result[32] __attribute__ ((aligned (8)));
static unsigned long pdc_result2[32] __attribute__ ((aligned (8))); static unsigned long pdc_result2[32] __attribute__ ((aligned (8)));
......
...@@ -153,7 +153,7 @@ static int __init processor_probe(struct parisc_device *dev) ...@@ -153,7 +153,7 @@ static int __init processor_probe(struct parisc_device *dev)
p->cpuid = cpuid; /* save CPU id */ p->cpuid = cpuid; /* save CPU id */
p->txn_addr = txn_addr; /* save CPU IRQ address */ p->txn_addr = txn_addr; /* save CPU IRQ address */
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
p->lock = SPIN_LOCK_UNLOCKED; spin_lock_init(&p->lock);
/* /*
** FIXME: review if any other initialization is clobbered ** FIXME: review if any other initialization is clobbered
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#define kDEBUG 0 #define kDEBUG 0
spinlock_t smp_lock = SPIN_LOCK_UNLOCKED; DEFINE_SPINLOCK(smp_lock);
volatile struct task_struct *smp_init_current_idle_task; volatile struct task_struct *smp_init_current_idle_task;
...@@ -332,7 +332,7 @@ smp_call_function (void (*func) (void *info), void *info, int retry, int wait) ...@@ -332,7 +332,7 @@ smp_call_function (void (*func) (void *info), void *info, int retry, int wait)
{ {
struct smp_call_struct data; struct smp_call_struct data;
unsigned long timeout; unsigned long timeout;
static spinlock_t lock = SPIN_LOCK_UNLOCKED; static DEFINE_SPINLOCK(lock);
int retries = 0; int retries = 0;
if (num_online_cpus() < 2) if (num_online_cpus() < 2)
......
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
/* dumped to the console via printk) */ /* dumped to the console via printk) */
#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK) #if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
spinlock_t pa_dbit_lock = SPIN_LOCK_UNLOCKED; DEFINE_SPINLOCK(pa_dbit_lock);
#endif #endif
int printbinary(char *buf, unsigned long x, int nbits) int printbinary(char *buf, unsigned long x, int nbits)
...@@ -385,7 +385,7 @@ void transfer_pim_to_trap_frame(struct pt_regs *regs) ...@@ -385,7 +385,7 @@ void transfer_pim_to_trap_frame(struct pt_regs *regs)
*/ */
void parisc_terminate(char *msg, struct pt_regs *regs, int code, unsigned long offset) void parisc_terminate(char *msg, struct pt_regs *regs, int code, unsigned long offset)
{ {
static spinlock_t terminate_lock = SPIN_LOCK_UNLOCKED; static DEFINE_SPINLOCK(terminate_lock);
oops_in_progress = 1; oops_in_progress = 1;
......
...@@ -853,7 +853,7 @@ static unsigned long space_id_index; ...@@ -853,7 +853,7 @@ static unsigned long space_id_index;
static unsigned long free_space_ids = NR_SPACE_IDS - 1; static unsigned long free_space_ids = NR_SPACE_IDS - 1;
static unsigned long dirty_space_ids = 0; static unsigned long dirty_space_ids = 0;
static spinlock_t sid_lock = SPIN_LOCK_UNLOCKED; static DEFINE_SPINLOCK(sid_lock);
unsigned long alloc_sid(void) unsigned long alloc_sid(void)
{ {
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#define SNAKES_EEPROM_BASE_ADDR 0xF0810400 #define SNAKES_EEPROM_BASE_ADDR 0xF0810400
#define MIRAGE_EEPROM_BASE_ADDR 0xF00C0400 #define MIRAGE_EEPROM_BASE_ADDR 0xF00C0400
static spinlock_t eisa_irq_lock = SPIN_LOCK_UNLOCKED; static DEFINE_SPINLOCK(eisa_irq_lock);
/* We can only have one EISA adapter in the system because neither /* We can only have one EISA adapter in the system because neither
* implementation can be flexed. * implementation can be flexed.
......
...@@ -396,7 +396,7 @@ iosapic_init(void) ...@@ -396,7 +396,7 @@ iosapic_init(void)
unsigned long cell = 0; unsigned long cell = 0;
/* init global data */ /* init global data */
iosapic_lock = SPIN_LOCK_UNLOCKED; spin_lock_init(&iosapic_lock);
iosapic_list = (struct iosapic_info *) NULL; iosapic_list = (struct iosapic_info *) NULL;
iosapic_count = 0; iosapic_count = 0;
......
...@@ -1563,7 +1563,7 @@ lba_common_init(struct lba_device *lba_dev) ...@@ -1563,7 +1563,7 @@ lba_common_init(struct lba_device *lba_dev)
{ {
pci_bios = &lba_bios_ops; pci_bios = &lba_bios_ops;
pcibios_register_hba(HBA_DATA(lba_dev)); pcibios_register_hba(HBA_DATA(lba_dev));
lba_dev->lba_lock = SPIN_LOCK_UNLOCKED; spin_lock_init(&lba_dev->lba_lock);
/* /*
** Set flags which depend on hw_rev ** Set flags which depend on hw_rev
......
...@@ -1861,7 +1861,7 @@ sba_common_init(struct sba_device *sba_dev) ...@@ -1861,7 +1861,7 @@ sba_common_init(struct sba_device *sba_dev)
__FUNCTION__, i, res_size, sba_dev->ioc[i].res_map); __FUNCTION__, i, res_size, sba_dev->ioc[i].res_map);
} }
sba_dev->sba_lock = SPIN_LOCK_UNLOCKED; spin_lock_init(&sba_dev->sba_lock);
ioc_needs_fdc = boot_cpu_data.pdc.capabilities & PDC_MODEL_IOPDIR_FDC; ioc_needs_fdc = boot_cpu_data.pdc.capabilities & PDC_MODEL_IOPDIR_FDC;
#ifdef DEBUG_SBA_INIT #ifdef DEBUG_SBA_INIT
......
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