]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Lock initializer cleanup: I386
authorThomas Gleixner <tglx@linutronix.de>
Fri, 21 Jan 2005 00:19:42 +0000 (16:19 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 21 Jan 2005 00:19:42 +0000 (16:19 -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>
18 files changed:
arch/i386/kernel/apm.c
arch/i386/kernel/cpu/mtrr/generic.c
arch/i386/kernel/efi.c
arch/i386/kernel/i8259.c
arch/i386/kernel/io_apic.c
arch/i386/kernel/mca.c
arch/i386/kernel/microcode.c
arch/i386/kernel/nmi.c
arch/i386/kernel/scx200.c
arch/i386/kernel/smp.c
arch/i386/kernel/time.c
arch/i386/kernel/traps.c
arch/i386/kernel/vm86.c
arch/i386/mach-visws/visws_apic.c
arch/i386/mach-voyager/voyager_smp.c
arch/i386/mm/pageattr.c
arch/i386/mm/pgtable.c
arch/i386/pci/common.c

index 31cd1168f98a536c2a2420a5341f3da2ab963536..a005116491f947b1cc4b1bf22e904cf2e3829765 100644 (file)
@@ -424,7 +424,7 @@ static int                  broken_psr;
 static DECLARE_WAIT_QUEUE_HEAD(apm_waitqueue);
 static DECLARE_WAIT_QUEUE_HEAD(apm_suspend_waitqueue);
 static struct apm_user *       user_list;
-static spinlock_t              user_list_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(user_list_lock);
 static struct desc_struct      bad_bios_desc = { 0, 0x00409200 };
 
 static char                    driver_version[] = "1.16ac";    /* no spaces */
index cf7fd685b345709600ff58ec3878973911f00d00..01cead718534a0ae6973212e4d464afb06f7b790 100644 (file)
@@ -231,7 +231,7 @@ static unsigned long set_mtrr_state(u32 deftype_lo, u32 deftype_hi)
 
 static unsigned long cr4 = 0;
 static u32 deftype_lo, deftype_hi;
-static spinlock_t set_atomicity_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(set_atomicity_lock);
 
 /*
  * Since we are disabling the cache don't allow any interrupts - they
index fd4988dcc7aa5de8273c9f561fc8f2832a813c65..8c3623b85b08551c982b2d062aa9f233a0646df3 100644 (file)
@@ -62,7 +62,7 @@ extern void * boot_ioremap(unsigned long, unsigned long);
  */
 
 static unsigned long efi_rt_eflags;
-static spinlock_t efi_rt_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(efi_rt_lock);
 static pgd_t efi_bak_pg_dir_pointer[2];
 
 static void efi_call_phys_prelog(void)
index 686a95bd0bd77fcce75ee59079312c457af5a0b0..5349062f54fb13716b8d5a2bf1dcbfd786a09a7e 100644 (file)
@@ -38,7 +38,7 @@
  * moves to arch independent land
  */
 
-spinlock_t i8259A_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(i8259A_lock);
 
 static void end_8259A_irq (unsigned int irq)
 {
index daa3bc0ec0db7f8490324e1035ee4ae0aaff7dcb..4b6477b4d8f9abc626bbed750d6555b035e50c31 100644 (file)
@@ -45,7 +45,7 @@
 int (*ioapic_renumber_irq)(int ioapic, int irq);
 atomic_t irq_mis_count;
 
-static spinlock_t ioapic_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ioapic_lock);
 
 /*
  *     Is the SiS APIC rmw bug present ?
index 6f455893f6abe55aeb3a45b4bf95197f08f5eebc..740eb6379940c952324557653eb5dd72b464d6b8 100644 (file)
@@ -65,7 +65,7 @@ EXPORT_SYMBOL(MCA_bus);
  *
  * Yes - Alan
  */
-static spinlock_t mca_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(mca_lock);
 
 /* Build the status info for the adapter */
 
index 9fe9b42e8c29a9afafae4ff667bda3edad5dc001..a77c612aad003fc66a637d87bd091ddafd114208 100644 (file)
@@ -109,7 +109,7 @@ MODULE_LICENSE("GPL");
 #define exttable_size(et) ((et)->count * EXT_SIGNATURE_SIZE + EXT_HEADER_SIZE)
 
 /* serialize access to the physical write to MSR 0x79 */
-static spinlock_t microcode_update_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(microcode_update_lock);
 
 /* no concurrent ->write()s are allowed on /dev/cpu/microcode */
 static DECLARE_MUTEX(microcode_sem);
index 0d2d59e183d3b7c853ff91b01ac78a45d86d0818..6bd4681df09f100dd4bb7eec4b4f24a9cf7f430e 100644 (file)
@@ -50,7 +50,7 @@ extern void show_registers(struct pt_regs *regs);
  * This is maintained separately from nmi_active because the NMI
  * watchdog may also be driven from the I/O APIC timer.
  */
-static spinlock_t lapic_nmi_owner_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(lapic_nmi_owner_lock);
 static unsigned int lapic_nmi_owner;
 #define LAPIC_NMI_WATCHDOG     (1<<0)
 #define LAPIC_NMI_RESERVED     (1<<1)
index df3342e3b4faef78ee67bdcae38f4c3f304c506c..d02df17e44801d6b97ef8c3b60ae7056be4323dc 100644 (file)
@@ -37,8 +37,8 @@ static struct pci_driver scx200_pci_driver = {
        .probe = scx200_probe,
 };
 
-spinlock_t scx200_gpio_lock = SPIN_LOCK_UNLOCKED;
-static spinlock_t scx200_gpio_config_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(scx200_gpio_lock);
+static DEFINE_SPINLOCK(scx200_gpio_config_lock);
 
 static int __devinit scx200_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
index d575f4b4b86b1da31f7f7e4f90838d6f09211ded..0ac1d19c7739f07c263d961d6b7733e2117b5490 100644 (file)
@@ -244,7 +244,7 @@ inline void send_IPI_mask_sequence(cpumask_t mask, int vector)
 static cpumask_t flush_cpumask;
 static struct mm_struct * flush_mm;
 static unsigned long flush_va;
-static spinlock_t tlbstate_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(tlbstate_lock);
 #define FLUSH_ALL      0xffffffff
 
 /*
@@ -481,7 +481,7 @@ void smp_send_reschedule(int cpu)
  * Structure and data for smp_call_function(). This is designed to minimise
  * static memory requirements. It also looks cleaner.
  */
-static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(call_lock);
 
 struct call_data_struct {
        void (*func) (void *info);
index c7ddb1d0fe0d8602e1369e9ac553a6bb186773aa..22d38b3a66b6488f7344584598cfa892df77d12b 100644 (file)
@@ -81,9 +81,9 @@ unsigned long cpu_khz;        /* Detected as we calibrate the TSC */
 
 extern unsigned long wall_jiffies;
 
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtc_lock);
 
-spinlock_t i8253_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(i8253_lock);
 EXPORT_SYMBOL(i8253_lock);
 
 struct timer_opts *cur_timer = &timer_none;
index 71553a8dbe54c8c50ea1903027c54e9f5e424a9c..bf616fd5ba41738f53678077e53726113c671315 100644 (file)
@@ -93,7 +93,7 @@ asmlinkage void machine_check(void);
 
 static int kstack_depth_to_print = 24;
 struct notifier_block *i386die_chain;
-static spinlock_t die_notifier_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(die_notifier_lock);
 
 int register_die_notifier(struct notifier_block *nb)
 {
@@ -551,7 +551,7 @@ static void unknown_nmi_error(unsigned char reason, struct pt_regs * regs)
        printk("Do you have a strange power saving mode enabled?\n");
 }
 
-static spinlock_t nmi_print_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(nmi_print_lock);
 
 void die_nmi (struct pt_regs *regs, const char *msg)
 {
index 8fc65ae1b8a34d2044e0d764d3c3ba95e328801f..2dd216ab0c7045dc303c98c83cd041447f26d2d6 100644 (file)
@@ -713,7 +713,7 @@ static struct vm86_irqs {
        int sig;
 } vm86_irqs[16];
 
-static spinlock_t irqbits_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(irqbits_lock);
 static int irqbits;
 
 #define ALLOWED_SIGS ( 1 /* 0 = don't send a signal */ \
index 818a2c5ae7cd9570d6d2f9c37df51bca1b485c8f..04e6585849a2f6d25f3e76cff2bd8763fa89bb40 100644 (file)
@@ -31,7 +31,7 @@
 #include "irq_vectors.h"
 
 
-static spinlock_t cobalt_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cobalt_lock);
 
 /*
  * Set the given Cobalt APIC Redirection Table entry to point
index 9c4449bc0dd78569c5d717234f3fde88c105ed59..c0ae05db4891c38b992405c82044b2ee00026a27 100644 (file)
@@ -254,7 +254,7 @@ static __u16 vic_irq_mask[NR_CPUS] __cacheline_aligned;
 static __u16 vic_irq_enable_mask[NR_CPUS] __cacheline_aligned = { 0 };
 
 /* Lock for enable/disable of VIC interrupts */
-static spinlock_t vic_irq_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
+static  __cacheline_aligned DEFINE_SPINLOCK(vic_irq_lock);
 
 /* The boot processor is correctly set up in PC mode when it 
  * comes up, but the secondaries need their master/slave 8259
@@ -798,7 +798,7 @@ fastcall void
 smp_vic_cmn_interrupt(struct pt_regs *regs)
 {
        static __u8 in_cmn_int = 0;
-       static spinlock_t cmn_int_lock = SPIN_LOCK_UNLOCKED;
+       static DEFINE_SPINLOCK(cmn_int_lock);
 
        /* common ints are broadcast, so make sure we only do this once */
        _raw_spin_lock(&cmn_int_lock);
@@ -831,7 +831,7 @@ smp_reschedule_interrupt(void)
 
 static struct mm_struct * flush_mm;
 static unsigned long flush_va;
-static spinlock_t tlbstate_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(tlbstate_lock);
 #define FLUSH_ALL      0xffffffff
 
 /*
@@ -1021,7 +1021,7 @@ smp_stop_cpu_function(void *dummy)
               __asm__("hlt");
 }
 
-static spinlock_t call_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(call_lock);
 
 struct call_data_struct {
        void (*func) (void *info);
index 46c86395fe40d9544828df1bb3d2446d4e632f51..862326f5dc38e65e358f2230d1d36737d0f5602d 100644 (file)
@@ -13,7 +13,7 @@
 #include <asm/processor.h>
 #include <asm/tlbflush.h>
 
-static spinlock_t cpa_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(cpa_lock);
 static struct list_head df_list = LIST_HEAD_INIT(df_list);
 
 
index 77ffaf855fd1e409a5c88e5965df812cee9dc6a8..0742d54f8bb06bc70fc5f3783ec3c08c0812a2fa 100644 (file)
@@ -172,7 +172,7 @@ void pmd_ctor(void *pmd, kmem_cache_t *cache, unsigned long flags)
  * recommendations and having no core impact whatsoever.
  * -- wli
  */
-spinlock_t pgd_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(pgd_lock);
 struct page *pgd_list;
 
 static inline void pgd_list_add(pgd_t *pgd)
index 4008b6c9af5b201ce2adda9926664fe35085b3a8..720975e1af5046cdcef151f57e68e94fd2378d82 100644 (file)
@@ -53,7 +53,7 @@ int pcibios_scanned;
  * This interrupt-safe spinlock protects all accesses to PCI
  * configuration space.
  */
-spinlock_t pci_config_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(pci_config_lock);
 
 /*
  * Several buggy motherboards address only 16 devices and mirror