Commit c7e4489f authored by Cliff Wickman's avatar Cliff Wickman Committed by Greg Kroah-Hartman

x86/uv: Fix uninitialized spinlocks

commit d2ebc71d upstream.

Initialize two spinlocks in tlb_uv.c and also properly define/initialize
the uv_irq_lock.

The lack of explicit initialization seems to be functionally
harmless, but it is diagnosed when these are turned on:

        CONFIG_DEBUG_SPINLOCK=y
        CONFIG_DEBUG_MUTEXES=y
        CONFIG_DEBUG_LOCK_ALLOC=y
        CONFIG_LOCKDEP=y
Signed-off-by: default avatarCliff Wickman <cpw@sgi.com>
Cc: Dimitri Sivanich <sivanich@sgi.com>
Link: http://lkml.kernel.org/r/E1RnXd1-0003wU-PM@eag09.americas.sgi.com
[ Added the uv_irq_lock initialization fix by Dimitri Sivanich ]
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2c6b1805
...@@ -1860,6 +1860,8 @@ static void __init init_per_cpu_tunables(void) ...@@ -1860,6 +1860,8 @@ static void __init init_per_cpu_tunables(void)
bcp->cong_reps = congested_reps; bcp->cong_reps = congested_reps;
bcp->cong_period = congested_period; bcp->cong_period = congested_period;
bcp->clocks_per_100_usec = usec_2_cycles(100); bcp->clocks_per_100_usec = usec_2_cycles(100);
spin_lock_init(&bcp->queue_lock);
spin_lock_init(&bcp->uvhub_lock);
} }
} }
......
...@@ -25,7 +25,7 @@ struct uv_irq_2_mmr_pnode{ ...@@ -25,7 +25,7 @@ struct uv_irq_2_mmr_pnode{
int irq; int irq;
}; };
static spinlock_t uv_irq_lock; static DEFINE_SPINLOCK(uv_irq_lock);
static struct rb_root uv_irq_root; static struct rb_root uv_irq_root;
static int uv_set_irq_affinity(struct irq_data *, const struct cpumask *, bool); static int uv_set_irq_affinity(struct irq_data *, const struct cpumask *, bool);
......
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