]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Lock initializer cleanup: PARISC
authorThomas Gleixner <tglx@linutronix.de>
Fri, 21 Jan 2005 00:23:11 +0000 (16:23 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 21 Jan 2005 00:23:11 +0000 (16:23 -0800)
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>
arch/parisc/kernel/cache.c
arch/parisc/kernel/firmware.c
arch/parisc/kernel/processor.c
arch/parisc/kernel/smp.c
arch/parisc/kernel/traps.c
arch/parisc/mm/init.c
drivers/parisc/eisa.c
drivers/parisc/iosapic.c
drivers/parisc/lba_pci.c
drivers/parisc/sba_iommu.c

index 51a3f366aa46bf5150d8739246cd510ad4a299bd..f46a07a792187626370dd139e9496dc0551bb6f0 100644 (file)
@@ -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
 
index 9001b792cfa4510b4fc4ea067ba9521216049483..e8b722d25aaffd7e36c921f3f4607c07e41b84a0 100644 (file)
@@ -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)));
 
index b4931ade43e778423a9d915fe3a2628e60b13e20..13b721cb9f557f3a2111b74c857da8c33f4bbf95 100644 (file)
@@ -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
index b421ea97d0b1473a2568573b4750370c4499d33b..75894bcd310aa90668fdd5c529cc873e9d526b77 100644 (file)
@@ -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)
index 7f57fb48e0b5a2031245c81c7e804ab7f3d83f7e..69a253fe2e8dd85084b4af84d5d12bc3f87683e2 100644 (file)
@@ -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;
 
index 00a717334de7758f9ed2989427120aaa4145361a..ff0e1eabe37a3ea5e704725e15f5bc3313c402b6 100644 (file)
@@ -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)
 {
index 10f24f4c210cc87dd1936827730be5c323b9a177..1bd487dd51dab12792c6b2f705ae102900f6ef8b 100644 (file)
@@ -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.
index 25c45f1c6ef5e2347168d1c73bbbbdaf9b98d0aa..7252d5c9ad818ff2a63cddeccf23f61a33fcd744 100644 (file)
@@ -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;
 
index 3dfb075499e04e341a6e9db5d6bdf84da0fb8ea5..8d1aa30f188d920df427000198865429d6f70f17 100644 (file)
@@ -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
index 609d5f4941bc4c41b1044992940dddc9218d150c..166d5fe79bc55b1ed5b3ae9b19eb0ea4b14a70e4 100644 (file)
@@ -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