Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2005-01-20 16:23:11 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-20 16:23:11 -0800
commita96524e481680b966233533d8f173b85068109b5 (patch)
treebc854c8a6d33a986fbb0ef1bf06a3f6a218f3517
parentcb542157903f2bb396880cf9f543a36a34b1a217 (diff)
[PATCH] Lock initializer cleanup: PARISC
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/parisc/kernel/cache.c2
-rw-r--r--arch/parisc/kernel/firmware.c2
-rw-r--r--arch/parisc/kernel/processor.c2
-rw-r--r--arch/parisc/kernel/smp.c4
-rw-r--r--arch/parisc/kernel/traps.c4
-rw-r--r--arch/parisc/mm/init.c2
-rw-r--r--drivers/parisc/eisa.c2
-rw-r--r--drivers/parisc/iosapic.c2
-rw-r--r--drivers/parisc/lba_pci.c2
-rw-r--r--drivers/parisc/sba_iommu.c2
10 files changed, 12 insertions, 12 deletions
diff --git a/arch/parisc/kernel/cache.c b/arch/parisc/kernel/cache.c
index 51a3f366aa46..f46a07a79218 100644
--- a/arch/parisc/kernel/cache.c
+++ b/arch/parisc/kernel/cache.c
@@ -40,7 +40,7 @@ EXPORT_SYMBOL(dcache_stride);
* by software. We put a spinlock around all TLB flushes to
* ensure this.
*/
-spinlock_t pa_tlb_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(pa_tlb_lock);
EXPORT_SYMBOL(pa_tlb_lock);
#endif
diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c
index 9001b792cfa4..e8b722d25aaf 100644
--- a/arch/parisc/kernel/firmware.c
+++ b/arch/parisc/kernel/firmware.c
@@ -70,7 +70,7 @@
#include <asm/system.h>
#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_result2[32] __attribute__ ((aligned (8)));
diff --git a/arch/parisc/kernel/processor.c b/arch/parisc/kernel/processor.c
index b4931ade43e7..13b721cb9f55 100644
--- a/arch/parisc/kernel/processor.c
+++ b/arch/parisc/kernel/processor.c
@@ -153,7 +153,7 @@ static int __init processor_probe(struct parisc_device *dev)
p->cpuid = cpuid; /* save CPU id */
p->txn_addr = txn_addr; /* save CPU IRQ address */
#ifdef CONFIG_SMP
- p->lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&p->lock);
/*
** FIXME: review if any other initialization is clobbered
diff --git a/arch/parisc/kernel/smp.c b/arch/parisc/kernel/smp.c
index b421ea97d0b1..75894bcd310a 100644
--- a/arch/parisc/kernel/smp.c
+++ b/arch/parisc/kernel/smp.c
@@ -54,7 +54,7 @@
#define kDEBUG 0
-spinlock_t smp_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(smp_lock);
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)
{
struct smp_call_struct data;
unsigned long timeout;
- static spinlock_t lock = SPIN_LOCK_UNLOCKED;
+ static DEFINE_SPINLOCK(lock);
int retries = 0;
if (num_online_cpus() < 2)
diff --git a/arch/parisc/kernel/traps.c b/arch/parisc/kernel/traps.c
index 7f57fb48e0b5..69a253fe2e8d 100644
--- a/arch/parisc/kernel/traps.c
+++ b/arch/parisc/kernel/traps.c
@@ -46,7 +46,7 @@
/* dumped to the console via printk) */
#if defined(CONFIG_SMP) || defined(CONFIG_DEBUG_SPINLOCK)
-spinlock_t pa_dbit_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(pa_dbit_lock);
#endif
int printbinary(char *buf, unsigned long x, int nbits)
@@ -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)
{
- static spinlock_t terminate_lock = SPIN_LOCK_UNLOCKED;
+ static DEFINE_SPINLOCK(terminate_lock);
oops_in_progress = 1;
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 00a717334de7..ff0e1eabe37a 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -853,7 +853,7 @@ static unsigned long space_id_index;
static unsigned long free_space_ids = NR_SPACE_IDS - 1;
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)
{
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c
index 10f24f4c210c..1bd487dd51da 100644
--- a/drivers/parisc/eisa.c
+++ b/drivers/parisc/eisa.c
@@ -54,7 +54,7 @@
#define SNAKES_EEPROM_BASE_ADDR 0xF0810400
#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
* implementation can be flexed.
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c
index 25c45f1c6ef5..7252d5c9ad81 100644
--- a/drivers/parisc/iosapic.c
+++ b/drivers/parisc/iosapic.c
@@ -396,7 +396,7 @@ iosapic_init(void)
unsigned long cell = 0;
/* init global data */
- iosapic_lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&iosapic_lock);
iosapic_list = (struct iosapic_info *) NULL;
iosapic_count = 0;
diff --git a/drivers/parisc/lba_pci.c b/drivers/parisc/lba_pci.c
index 3dfb075499e0..8d1aa30f188d 100644
--- a/drivers/parisc/lba_pci.c
+++ b/drivers/parisc/lba_pci.c
@@ -1563,7 +1563,7 @@ lba_common_init(struct lba_device *lba_dev)
{
pci_bios = &lba_bios_ops;
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
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
index 609d5f4941bc..166d5fe79bc5 100644
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -1861,7 +1861,7 @@ sba_common_init(struct sba_device *sba_dev)
__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;
#ifdef DEBUG_SBA_INIT