]> git.hungrycats.org Git - linux/commitdiff
[PATCH] Lock initializer cleanup: PPC64
authorThomas Gleixner <tglx@linutronix.de>
Fri, 21 Jan 2005 00:16:55 +0000 (16:16 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 21 Jan 2005 00:16:55 +0000 (16:16 -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>
23 files changed:
arch/ppc64/kernel/eeh.c
arch/ppc64/kernel/i8259.c
arch/ppc64/kernel/iSeries_pci.c
arch/ppc64/kernel/mpic.c
arch/ppc64/kernel/pSeries_lpar.c
arch/ppc64/kernel/pSeries_nvram.c
arch/ppc64/kernel/pSeries_setup.c
arch/ppc64/kernel/pSeries_smp.c
arch/ppc64/kernel/pci.c
arch/ppc64/kernel/pmac_feature.c
arch/ppc64/kernel/pmac_nvram.c
arch/ppc64/kernel/pmac_smp.c
arch/ppc64/kernel/prom.c
arch/ppc64/kernel/ras.c
arch/ppc64/kernel/rtas.c
arch/ppc64/kernel/rtas_flash.c
arch/ppc64/kernel/rtasd.c
arch/ppc64/kernel/smp.c
arch/ppc64/kernel/time.c
arch/ppc64/kernel/traps.c
arch/ppc64/kernel/viopath.c
arch/ppc64/mm/hash_native.c
arch/ppc64/mm/init.c

index cfecc9145a4b6bb91bb1855474069d40ab11e58a..bfb03dc84eca0e3868ffb593bb5e77122a9a1b6a 100644 (file)
@@ -76,7 +76,7 @@
 #define BUID_LO(buid) ((buid) & 0xffffffff)
 
 /* EEH event workqueue setup. */
-static spinlock_t eeh_eventlist_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(eeh_eventlist_lock);
 LIST_HEAD(eeh_eventlist);
 static void eeh_event_handler(void *);
 DECLARE_WORK(eeh_event_wq, eeh_event_handler, NULL);
@@ -103,7 +103,7 @@ static int eeh_subsystem_enabled;
 
 /* Buffer for reporting slot-error-detail rtas calls */
 static unsigned char slot_errbuf[RTAS_ERROR_LOG_MAX];
-static spinlock_t slot_errbuf_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(slot_errbuf_lock);
 static int eeh_error_buf_size;
 
 /* System monitoring statistics */
index 3458cf0c5a544aea026911e32c80908cbf9c2692..9bea66770ab07bb411f85b4c3e636b2d9527bc12 100644 (file)
@@ -21,7 +21,7 @@ unsigned char cached_8259[2] = { 0xff, 0xff };
 #define cached_A1 (cached_8259[0])
 #define cached_21 (cached_8259[1])
 
-static spinlock_t i8259_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
+static  __cacheline_aligned_in_smp DEFINE_SPINLOCK(i8259_lock);
 
 static int i8259_pic_irq_offset;
 static int i8259_present;
index 5d74b1e572418b874d6f848ba18a0603516959bf..ffe54e1bd8971d4d12fc19080da7c9e1ab718fac 100644 (file)
@@ -96,7 +96,7 @@ static u8 *iobar_table;
  * Static and Global variables
  */
 static char *pci_io_text = "iSeries PCI I/O";
-static spinlock_t iomm_table_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(iomm_table_lock);
 
 /*
  * iomm_table_initialize
index fbe209fe06f35f5819cde89813b4de6f2fbd389e..593ea5b82afa0502e33478896aa65abfbe46f25c 100644 (file)
@@ -42,7 +42,7 @@
 
 static struct mpic *mpics;
 static struct mpic *mpic_primary;
-static spinlock_t mpic_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(mpic_lock);
 
 
 /*
index b0623213c24412ba8bfb9ce79d9d2b11f78689d0..624acf0c8cec6ab792438660cd49e9cfe11638c0 100644 (file)
@@ -335,7 +335,7 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group,
        return (slot & 7) | (secondary << 3);
 }
 
-static spinlock_t pSeries_lpar_tlbie_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(pSeries_lpar_tlbie_lock);
 
 static long pSeries_lpar_hpte_remove(unsigned long hpte_group)
 {
index 5d74028d512f707593551e0fea3a8e0bb097bb06..52aeefdeca86427ac8e05c0f7f90e551f55aeee0 100644 (file)
@@ -31,7 +31,7 @@
 static unsigned int nvram_size;
 static int nvram_fetch, nvram_store;
 static char nvram_buf[NVRW_CNT];       /* assume this is in the first 4GB */
-static spinlock_t nvram_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(nvram_lock);
 
 
 static ssize_t pSeries_nvram_read(char *buf, size_t count, loff_t *index)
index 69591745eabe7400cb7d311dfb918954eebae4d7..fcc37936dc904099c884be144cb507ffc7a903bb 100644 (file)
@@ -394,7 +394,7 @@ static void pSeries_progress(char *s, unsigned short hex)
        char *os;
        static int display_character, set_indicator;
        static int max_width;
-       static spinlock_t progress_lock = SPIN_LOCK_UNLOCKED;
+       static DEFINE_SPINLOCK(progress_lock);
        static int pending_newline = 0;  /* did last write end with unprinted newline? */
 
        if (!rtas.base)
index e72dda161fbe5975fd8bf88577351c4153cb82aa..6104823d470f9ae999432de6b49990ced255aa56 100644 (file)
@@ -268,7 +268,7 @@ static void __devinit smp_xics_setup_cpu(int cpu)
                (1UL << interrupt_server_size) - 1 - default_distrib_server, 1);
 }
 
-static spinlock_t timebase_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(timebase_lock);
 static unsigned long timebase = 0;
 
 static void __devinit pSeries_give_timebase(void)
index a7bf62655601b8b7c01517b113404d47c77511c0..f7486bee078fc41e71d4eeb0f9a6c15c6a2d0d0f 100644 (file)
@@ -157,7 +157,7 @@ void pcibios_align_resource(void *data, struct resource *res,
        res->start = start;
 }
 
-static spinlock_t hose_spinlock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(hose_spinlock);
 
 /*
  * pci_controller(phb) initialized common variables.
index bd78aebaa24d262525635fefd8e7c9a8f7290c76..56686fc9df0dbda95840fd4a49f791edd13f94b7 100644 (file)
@@ -53,7 +53,7 @@
  * We use a single global lock to protect accesses. Each driver has
  * to take care of its own locking
  */
-static spinlock_t feature_lock  __pmacdata = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(feature_lock  __pmacdata);
 
 #define LOCK(flags)    spin_lock_irqsave(&feature_lock, flags);
 #define UNLOCK(flags)  spin_unlock_irqrestore(&feature_lock, flags);
index 5ab6cd4019734142a16c6d8ae4cc2d175e6dca15..e32a902236e3eeaef4801fc9088d0648330c1ec7 100644 (file)
@@ -75,7 +75,7 @@ struct core99_header {
 static volatile unsigned char *nvram_data;
 static int core99_bank = 0;
 // XXX Turn that into a sem
-static spinlock_t nv_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(nv_lock);
 
 extern int system_running;
 
index 4008b4410d410ce2d58d9fde0298537f9a2d7a79..e0b37079943c5ad5af472b8c19dc9e768286305c 100644 (file)
@@ -68,7 +68,7 @@ extern struct smp_ops_t *smp_ops;
 
 static void (*pmac_tb_freeze)(int freeze);
 static struct device_node *pmac_tb_clock_chip_host;
-static spinlock_t timebase_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(timebase_lock);
 static unsigned long timebase;
 
 static void smp_core99_cypress_tb_freeze(int freeze)
index 4ab5db67ebb42f7382cc7d356a9a512291b74a64..fd90ca6357ae6cb103404e2fa344864f4c5147f2 100644 (file)
@@ -95,7 +95,7 @@ static struct device_node *allnodes = NULL;
 /* use when traversing tree through the allnext, child, sibling,
  * or parent members of struct device_node.
  */
-static rwlock_t devtree_lock = RW_LOCK_UNLOCKED;
+static DEFINE_RWLOCK(devtree_lock);
 
 /* export that to outside world */
 struct device_node *of_chosen;
index 7639e3d99c04600f30cea4fb13c021bab3e676d1..1c4c796b212b03ada36dae8130913bc95d1671ff 100644 (file)
@@ -53,7 +53,7 @@
 #include <asm/ppcdebug.h>
 
 static unsigned char ras_log_buf[RTAS_ERROR_LOG_MAX];
-static spinlock_t ras_log_buf_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(ras_log_buf_lock);
 
 char mce_data_buf[RTAS_ERROR_LOG_MAX]
 ;
index b69e84c90300f892f3c20b6ee7283c43d3babd2a..e3d7f833ba1d4713c9b7a736ae2596b94389cfee 100644 (file)
@@ -41,7 +41,7 @@ EXPORT_SYMBOL(rtas);
 
 char rtas_err_buf[RTAS_ERROR_LOG_MAX];
 
-spinlock_t rtas_data_buf_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtas_data_buf_lock);
 char rtas_data_buf[RTAS_DATA_BUF_SIZE]__page_aligned;
 unsigned long rtas_rmo_buf;
 
index b43b8e4c03008ac3db385d496857c276a7831e03..c0cefd3c93efdc2ad54b277b6d870b8f913eecd4 100644 (file)
@@ -105,7 +105,7 @@ struct rtas_validate_flash_t
        unsigned int update_results;    /* Update results token */
 };
 
-static spinlock_t flash_file_open_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(flash_file_open_lock);
 static struct proc_dir_entry *firmware_flash_pde;
 static struct proc_dir_entry *firmware_update_pde;
 static struct proc_dir_entry *validate_pde;
index b5a96ec9f3bcd36f3e101d797cefa7760c637bbf..e41a158972ad726ba4d62fb048734bb4189434a1 100644 (file)
@@ -34,7 +34,7 @@
 #define DEBUG(A...)
 #endif
 
-static spinlock_t rtasd_log_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(rtasd_log_lock);
 
 DECLARE_WAIT_QUEUE_HEAD(rtas_log_wait);
 
index a125b65213261b4a017c3c9f6f1ce35df68894f0..29e56852e7d75942ff34e7ee04d1eb882ee6279f 100644 (file)
@@ -202,7 +202,7 @@ void smp_send_stop(void)
  * static memory requirements. It also looks cleaner.
  * Stolen from the i386 version.
  */
-static spinlock_t call_lock __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED;
+static  __cacheline_aligned_in_smp DEFINE_SPINLOCK(call_lock);
 
 static struct call_data_struct {
        void (*func) (void *info);
index 01b21095b76cd234b6678ab1155c03410b53dc96..3d88a7086ad57b01ad46efec312f328bff1f4f78 100644 (file)
@@ -91,7 +91,7 @@ unsigned long xtime_sync_interval;
 unsigned long tb_to_xs;
 unsigned      tb_to_us;
 unsigned long processor_freq;
-spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+DEFINE_SPINLOCK(rtc_lock);
 
 unsigned long tb_to_ns_scale;
 unsigned long tb_to_ns_shift;
index 418aff49933ed129a5e46972a7263c2569e3cebe..1c4968ef93991594cb38e6a871d78785d2c305a3 100644 (file)
@@ -60,7 +60,7 @@ EXPORT_SYMBOL(__debugger_fault_handler);
 #endif
 
 struct notifier_block *ppc64_die_chain;
-static spinlock_t die_notifier_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(die_notifier_lock);
 
 int register_die_notifier(struct notifier_block *nb)
 {
@@ -77,7 +77,7 @@ int register_die_notifier(struct notifier_block *nb)
  * Trap & Exception support
  */
 
-static spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(die_lock);
 
 int die(const char *str, struct pt_regs *regs, long err)
 {
index a6e90222c1ad4eb5e4d89d2423d012a3cb4b5b62..74f185ec91f8cef54304376448255ca150ea1bb0 100644 (file)
@@ -64,7 +64,7 @@ static struct viopathStatus {
        int numberAllocated;
 } viopathStatus[HVMAXARCHITECTEDLPS];
 
-static spinlock_t statuslock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(statuslock);
 
 /*
  * For each kind of event we allocate a buffer that is
index 6506f3d0fd1a739a6026548886a1fe3d10bc97bc..dfd24ad27b14a5a0a409735fd681c0bfa9c2727f 100644 (file)
@@ -25,7 +25,7 @@
 
 #define HPTE_LOCK_BIT 3
 
-static spinlock_t native_tlbie_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(native_tlbie_lock);
 
 static inline void native_lock_hpte(HPTE *hptep)
 {
index 723a3dc77db6d32204ec667340285fd3c94f3b01..4cb05a070c0109056db541ebb6295909fe5278d2 100644 (file)
@@ -470,7 +470,7 @@ void free_initrd_mem(unsigned long start, unsigned long end)
 }
 #endif
 
-static spinlock_t mmu_context_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(mmu_context_lock);
 static DEFINE_IDR(mmu_context_idr);
 
 int init_new_context(struct task_struct *tsk, struct mm_struct *mm)