Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2005-01-20 16:16:55 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-01-20 16:16:55 -0800
commitfd42b1cf0ceb521f89f109b40f17b4040175ffbe (patch)
tree5a315e6d68220aa54f57d1313d5dd068e48d6de7
parent9b3be57b84c38e59fb0c4001a4c0e41418c6bcae (diff)
[PATCH] Lock initializer cleanup: PPC64
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/ppc64/kernel/eeh.c4
-rw-r--r--arch/ppc64/kernel/i8259.c2
-rw-r--r--arch/ppc64/kernel/iSeries_pci.c2
-rw-r--r--arch/ppc64/kernel/mpic.c2
-rw-r--r--arch/ppc64/kernel/pSeries_lpar.c2
-rw-r--r--arch/ppc64/kernel/pSeries_nvram.c2
-rw-r--r--arch/ppc64/kernel/pSeries_setup.c2
-rw-r--r--arch/ppc64/kernel/pSeries_smp.c2
-rw-r--r--arch/ppc64/kernel/pci.c2
-rw-r--r--arch/ppc64/kernel/pmac_feature.c2
-rw-r--r--arch/ppc64/kernel/pmac_nvram.c2
-rw-r--r--arch/ppc64/kernel/pmac_smp.c2
-rw-r--r--arch/ppc64/kernel/prom.c2
-rw-r--r--arch/ppc64/kernel/ras.c2
-rw-r--r--arch/ppc64/kernel/rtas.c2
-rw-r--r--arch/ppc64/kernel/rtas_flash.c2
-rw-r--r--arch/ppc64/kernel/rtasd.c2
-rw-r--r--arch/ppc64/kernel/smp.c2
-rw-r--r--arch/ppc64/kernel/time.c2
-rw-r--r--arch/ppc64/kernel/traps.c4
-rw-r--r--arch/ppc64/kernel/viopath.c2
-rw-r--r--arch/ppc64/mm/hash_native.c2
-rw-r--r--arch/ppc64/mm/init.c2
23 files changed, 25 insertions, 25 deletions
diff --git a/arch/ppc64/kernel/eeh.c b/arch/ppc64/kernel/eeh.c
index cfecc9145a4b..bfb03dc84eca 100644
--- a/arch/ppc64/kernel/eeh.c
+++ b/arch/ppc64/kernel/eeh.c
@@ -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 */
diff --git a/arch/ppc64/kernel/i8259.c b/arch/ppc64/kernel/i8259.c
index 3458cf0c5a54..9bea66770ab0 100644
--- a/arch/ppc64/kernel/i8259.c
+++ b/arch/ppc64/kernel/i8259.c
@@ -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;
diff --git a/arch/ppc64/kernel/iSeries_pci.c b/arch/ppc64/kernel/iSeries_pci.c
index 5d74b1e57241..ffe54e1bd897 100644
--- a/arch/ppc64/kernel/iSeries_pci.c
+++ b/arch/ppc64/kernel/iSeries_pci.c
@@ -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
diff --git a/arch/ppc64/kernel/mpic.c b/arch/ppc64/kernel/mpic.c
index fbe209fe06f3..593ea5b82afa 100644
--- a/arch/ppc64/kernel/mpic.c
+++ b/arch/ppc64/kernel/mpic.c
@@ -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);
/*
diff --git a/arch/ppc64/kernel/pSeries_lpar.c b/arch/ppc64/kernel/pSeries_lpar.c
index b0623213c244..624acf0c8cec 100644
--- a/arch/ppc64/kernel/pSeries_lpar.c
+++ b/arch/ppc64/kernel/pSeries_lpar.c
@@ -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)
{
diff --git a/arch/ppc64/kernel/pSeries_nvram.c b/arch/ppc64/kernel/pSeries_nvram.c
index 5d74028d512f..52aeefdeca86 100644
--- a/arch/ppc64/kernel/pSeries_nvram.c
+++ b/arch/ppc64/kernel/pSeries_nvram.c
@@ -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)
diff --git a/arch/ppc64/kernel/pSeries_setup.c b/arch/ppc64/kernel/pSeries_setup.c
index 69591745eabe..fcc37936dc90 100644
--- a/arch/ppc64/kernel/pSeries_setup.c
+++ b/arch/ppc64/kernel/pSeries_setup.c
@@ -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)
diff --git a/arch/ppc64/kernel/pSeries_smp.c b/arch/ppc64/kernel/pSeries_smp.c
index e72dda161fbe..6104823d470f 100644
--- a/arch/ppc64/kernel/pSeries_smp.c
+++ b/arch/ppc64/kernel/pSeries_smp.c
@@ -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)
diff --git a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c
index a7bf62655601..f7486bee078f 100644
--- a/arch/ppc64/kernel/pci.c
+++ b/arch/ppc64/kernel/pci.c
@@ -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.
diff --git a/arch/ppc64/kernel/pmac_feature.c b/arch/ppc64/kernel/pmac_feature.c
index bd78aebaa24d..56686fc9df0d 100644
--- a/arch/ppc64/kernel/pmac_feature.c
+++ b/arch/ppc64/kernel/pmac_feature.c
@@ -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);
diff --git a/arch/ppc64/kernel/pmac_nvram.c b/arch/ppc64/kernel/pmac_nvram.c
index 5ab6cd401973..e32a902236e3 100644
--- a/arch/ppc64/kernel/pmac_nvram.c
+++ b/arch/ppc64/kernel/pmac_nvram.c
@@ -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;
diff --git a/arch/ppc64/kernel/pmac_smp.c b/arch/ppc64/kernel/pmac_smp.c
index 4008b4410d41..e0b37079943c 100644
--- a/arch/ppc64/kernel/pmac_smp.c
+++ b/arch/ppc64/kernel/pmac_smp.c
@@ -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)
diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c
index 4ab5db67ebb4..fd90ca6357ae 100644
--- a/arch/ppc64/kernel/prom.c
+++ b/arch/ppc64/kernel/prom.c
@@ -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;
diff --git a/arch/ppc64/kernel/ras.c b/arch/ppc64/kernel/ras.c
index 7639e3d99c04..1c4c796b212b 100644
--- a/arch/ppc64/kernel/ras.c
+++ b/arch/ppc64/kernel/ras.c
@@ -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]
;
diff --git a/arch/ppc64/kernel/rtas.c b/arch/ppc64/kernel/rtas.c
index b69e84c90300..e3d7f833ba1d 100644
--- a/arch/ppc64/kernel/rtas.c
+++ b/arch/ppc64/kernel/rtas.c
@@ -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;
diff --git a/arch/ppc64/kernel/rtas_flash.c b/arch/ppc64/kernel/rtas_flash.c
index b43b8e4c0300..c0cefd3c93ef 100644
--- a/arch/ppc64/kernel/rtas_flash.c
+++ b/arch/ppc64/kernel/rtas_flash.c
@@ -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;
diff --git a/arch/ppc64/kernel/rtasd.c b/arch/ppc64/kernel/rtasd.c
index b5a96ec9f3bc..e41a158972ad 100644
--- a/arch/ppc64/kernel/rtasd.c
+++ b/arch/ppc64/kernel/rtasd.c
@@ -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);
diff --git a/arch/ppc64/kernel/smp.c b/arch/ppc64/kernel/smp.c
index a125b6521326..29e56852e7d7 100644
--- a/arch/ppc64/kernel/smp.c
+++ b/arch/ppc64/kernel/smp.c
@@ -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);
diff --git a/arch/ppc64/kernel/time.c b/arch/ppc64/kernel/time.c
index 01b21095b76c..3d88a7086ad5 100644
--- a/arch/ppc64/kernel/time.c
+++ b/arch/ppc64/kernel/time.c
@@ -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;
diff --git a/arch/ppc64/kernel/traps.c b/arch/ppc64/kernel/traps.c
index 418aff49933e..1c4968ef9399 100644
--- a/arch/ppc64/kernel/traps.c
+++ b/arch/ppc64/kernel/traps.c
@@ -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)
{
diff --git a/arch/ppc64/kernel/viopath.c b/arch/ppc64/kernel/viopath.c
index a6e90222c1ad..74f185ec91f8 100644
--- a/arch/ppc64/kernel/viopath.c
+++ b/arch/ppc64/kernel/viopath.c
@@ -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
diff --git a/arch/ppc64/mm/hash_native.c b/arch/ppc64/mm/hash_native.c
index 6506f3d0fd1a..dfd24ad27b14 100644
--- a/arch/ppc64/mm/hash_native.c
+++ b/arch/ppc64/mm/hash_native.c
@@ -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)
{
diff --git a/arch/ppc64/mm/init.c b/arch/ppc64/mm/init.c
index 723a3dc77db6..4cb05a070c01 100644
--- a/arch/ppc64/mm/init.c
+++ b/arch/ppc64/mm/init.c
@@ -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)