Commit 090d7b9e authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Linus Torvalds

[PATCH] Lock initializer cleanup: IA64

Use the new lock initializers DEFINE_SPIN_LOCK and DEFINE_RW_LOCK
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 40ecdb70
......@@ -99,7 +99,7 @@
#define DBG(fmt...)
#endif
static spinlock_t iosapic_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(iosapic_lock);
/* These tables map IA-64 vectors to the IOSAPIC pin that generates this vector. */
......
......@@ -271,7 +271,7 @@ ia64_mca_cpe_int_handler (int cpe_irq, void *arg, struct pt_regs *ptregs)
{
static unsigned long cpe_history[CPE_HISTORY_LENGTH];
static int index;
static spinlock_t cpe_history_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(cpe_history_lock);
IA64_MCA_DEBUG("%s: received interrupt vector = %#x on CPU %d\n",
__FUNCTION__, cpe_irq, smp_processor_id());
......@@ -922,7 +922,7 @@ ia64_mca_cmc_int_handler(int cmc_irq, void *arg, struct pt_regs *ptregs)
{
static unsigned long cmc_history[CMC_HISTORY_LENGTH];
static int index;
static spinlock_t cmc_history_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(cmc_history_lock);
IA64_MCA_DEBUG("%s: received interrupt vector = %#x on CPU %d\n",
__FUNCTION__, cmc_irq, smp_processor_id());
......
......@@ -45,7 +45,7 @@ static ia64_mca_os_to_sal_state_t *os_to_sal_handoff_state;
/* from mca_drv_asm.S */
extern void *mca_handler_bhhook(void);
static spinlock_t mca_bh_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(mca_bh_lock);
typedef enum {
MCA_IS_LOCAL = 0,
......
......@@ -18,7 +18,7 @@
#include <asm/sal.h>
#include <asm/pal.h>
spinlock_t sal_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
__cacheline_aligned DEFINE_SPINLOCK(sal_lock);
unsigned long sal_platform_features;
unsigned short sal_revision;
......
......@@ -52,7 +52,7 @@
* Structure and data for smp_call_function(). This is designed to minimise static memory
* requirements. It also looks cleaner.
*/
static spinlock_t call_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
static __cacheline_aligned DEFINE_SPINLOCK(call_lock);
struct call_data_struct {
void (*func) (void *info);
......
......@@ -68,7 +68,7 @@
#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 volatile unsigned long go[SLAVE + 1];
#define DEBUG_ITC_SYNC 0
......
......@@ -87,7 +87,7 @@ static unsigned char **io_tlb_orig_addr;
/*
* Protect the above data structures in the map and unmap calls
*/
static spinlock_t io_tlb_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(io_tlb_lock);
static int __init
setup_io_tlb_npages(char *str)
......
......@@ -88,7 +88,7 @@ wrap_mmu_context (struct mm_struct *mm)
void
ia64_global_tlb_purge (unsigned long start, unsigned long end, unsigned long nbits)
{
static spinlock_t ptcg_lock = SPIN_LOCK_UNLOCKED;
static DEFINE_SPINLOCK(ptcg_lock);
/* HW requires global serialization of ptc.ga. */
spin_lock(&ptcg_lock);
......
......@@ -42,7 +42,7 @@
void sn2_ptc_deadlock_recovery(volatile unsigned long *, unsigned long data0,
volatile unsigned long *, unsigned long data1);
static spinlock_t sn2_global_ptc_lock __cacheline_aligned = SPIN_LOCK_UNLOCKED;
static __cacheline_aligned DEFINE_SPINLOCK(sn2_global_ptc_lock);
static unsigned long sn2_ptc_deadlock_count;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment