]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Lock initializer cleanup: SPARC64
authorThomas Gleixner <tglx@linutronix.de>
Fri, 21 Jan 2005 00:23:26 +0000 (16:23 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 21 Jan 2005 00:23:26 +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>
13 files changed:
arch/sparc64/kernel/auxio.c
arch/sparc64/kernel/devices.c
arch/sparc64/kernel/irq.c
arch/sparc64/kernel/pci.c
arch/sparc64/kernel/pci_psycho.c
arch/sparc64/kernel/pci_schizo.c
arch/sparc64/kernel/process.c
arch/sparc64/kernel/smp.c
arch/sparc64/kernel/time.c
arch/sparc64/kernel/traps.c
arch/sparc64/mm/init.c
arch/sparc64/prom/p1275.c
arch/sparc64/solaris/timod.c

index 11672d2d3b90195c1ccf5725ac81145c6cc9fd03..e4dfbb6e36a34ec700798ce745c15c193835f853 100644 (file)
@@ -26,7 +26,7 @@ enum auxio_type {
 };
 
 static enum auxio_type auxio_devtype = AUXIO_TYPE_NODEV;
-static spinlock_t auxio_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(auxio_lock);
 
 static void __auxio_sbus_set(u8 bits_on, u8 bits_off)
 {
index 559b6d753881c5aa802d6421e2c8e65beb39d58c..d710274e516bf6a400b573473692611b6dbe024c 100644 (file)
@@ -24,7 +24,7 @@
 /* Used to synchronize acceses to NatSemi SUPER I/O chip configure
  * operations in asm/ns87303.h
  */
-spinlock_t ns87303_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(ns87303_lock);
 
 extern void cpu_probe(void);
 extern void central_probe(void);
index 3162b2ed1e42659f66df53c57504c49264722896..52f7bf9052a667f3d75f11c8ad29ceb93d7e70d7 100644 (file)
@@ -101,7 +101,7 @@ struct irqaction *irq_action[NR_IRQS+1] = {
  * read things in the table.  IRQ handler processing orders
  * its' accesses such that no locking is needed.
  */
-static spinlock_t irq_action_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(irq_action_lock);
 
 static void register_irq_proc (unsigned int irq);
 
index c4d05338794545624791c057e28b8b976835fcf1..2ffd1efefcc09bec7b1d8fd406bbac6b9dcd258b 100644 (file)
@@ -56,7 +56,7 @@ volatile int pci_poke_in_progress;
 volatile int pci_poke_cpu = -1;
 volatile int pci_poke_faulted;
 
-static spinlock_t pci_poke_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(pci_poke_lock);
 
 void pci_config_read8(u8 *addr, u8 *ret)
 {
index 70b2441b6a638253aa19006c310a225b101281aa..41fe09913879357eaf652218b3ca5eef7c1beb90 100644 (file)
@@ -433,7 +433,7 @@ enum psycho_error_type {
 #define  PSYCHO_STCLINE_VALID   0x0000000000000002UL   /* Valid */
 #define  PSYCHO_STCLINE_FOFN    0x0000000000000001UL   /* Fetch Outstanding / Flush Necessary */
 
-static spinlock_t stc_buf_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(stc_buf_lock);
 static unsigned long stc_error_buf[128];
 static unsigned long stc_tag_buf[16];
 static unsigned long stc_line_buf[16];
index f72da320bce4d252996a984e1417e13fbec69414..9f0a34f6d93f2cca27ae7e1672ad6224d3a32e27 100644 (file)
@@ -377,7 +377,7 @@ enum schizo_error_type {
        UE_ERR, CE_ERR, PCI_ERR, SAFARI_ERR
 };
 
-static spinlock_t stc_buf_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(stc_buf_lock);
 static unsigned long stc_error_buf[128];
 static unsigned long stc_tag_buf[16];
 static unsigned long stc_line_buf[16];
index 80cf9bcf9dc823ffcaa676f850816f5bdf7e4574..eaeed1025bf9cc66c2b9034b06ff78529c442401 100644 (file)
@@ -282,7 +282,7 @@ void show_stackframe32(struct sparc_stackf32 *sf)
 }
 
 #ifdef CONFIG_SMP
-static spinlock_t regdump_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(regdump_lock);
 #endif
 
 void __show_regs(struct pt_regs * regs)
index f2d24dc1d5ee56b72b4a25edca7331b46cffbd9b..900f6e6cc8057935fe300cee270c342897a109ba 100644 (file)
@@ -154,7 +154,7 @@ static unsigned long current_tick_offset;
 #define NUM_ROUNDS     64      /* magic value */
 #define NUM_ITERS      5       /* likewise */
 
-static spinlock_t itc_sync_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(itc_sync_lock);
 static unsigned long go[SLAVE + 1];
 
 #define DEBUG_TICK_SYNC        0
@@ -546,7 +546,7 @@ struct call_data_struct {
        int wait;
 };
 
-static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(call_lock);
 static struct call_data_struct *call_data;
 
 extern unsigned long xcall_call_function;
@@ -1146,7 +1146,7 @@ report:
 }
 
 /* /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)
 {
index 0a93354f16a6f214a7deb002ca3198f63b50f9f3..5c341ece0ce48903ad5595ea832b99be703aaaa7 100644 (file)
@@ -46,8 +46,8 @@
 #include <asm/sections.h>
 #include <asm/cpudata.h>
 
-spinlock_t mostek_lock = SPIN_LOCK_UNLOCKED;
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(mostek_lock);
+DEFINE_SPINLOCK(rtc_lock);
 unsigned long mstk48t02_regs = 0UL;
 #ifdef CONFIG_PCI
 unsigned long ds1287_regs = 0UL;
index 7519f39c5a3d1c9db3153e4c3d324eaba9ac7b5a..7d0e96f00bd003bce2ea0e3d4813441111e95862 100644 (file)
@@ -42,7 +42,7 @@
 #endif
 
 struct notifier_block *sparc64die_chain;
-static spinlock_t die_notifier_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(die_notifier_lock);
 
 int register_die_notifier(struct notifier_block *nb)
 {
index ebc49a45102a68c739e117c6a0b7fce6125463e3..68e1fc05dba5da604433ed7ad214ef29cb06cae7 100644 (file)
@@ -59,7 +59,7 @@ unsigned long pfn_base;
 static unsigned long bootmap_base;
 
 /* get_new_mmu_context() uses "cache + 1".  */
-spinlock_t ctx_alloc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(ctx_alloc_lock);
 unsigned long tlb_context_cache = CTX_FIRST_VERSION - 1;
 #define CTX_BMAP_SLOTS (1UL << (CTX_VERSION_SHIFT - 6))
 unsigned long mmu_context_bmap[CTX_BMAP_SLOTS];
index eaa6ab19f51d48c30d4ff7307e0dd8fab3abc6cd..f058d3aca6bae56d538109a31c73f0f2873d0924 100644 (file)
@@ -251,7 +251,7 @@ void prom_cif_callback(void)
  * This provides SMP safety on the p1275buf. prom_callback() drops this lock
  * to allow recursuve acquisition.
  */
-spinlock_t prom_entry_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(prom_entry_lock);
 
 long p1275_cmd (char *service, long fmt, ...)
 {
index 79d15434d97523f8c6d5e74cc8fd468060368de8..022c80f4339233add3d1c156028506b5aa53cdbc 100644 (file)
@@ -29,7 +29,7 @@
 
 asmlinkage int solaris_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
 
-static spinlock_t timod_pagelock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(timod_pagelock);
 static char * page = NULL ;
 
 #ifndef DEBUG_SOLARIS_KMALLOC