|
@@ -7,6 +7,7 @@
|
|
|
#include <linux/debugfs.h>
|
|
|
#include <linux/log2.h>
|
|
|
#include <linux/gfp.h>
|
|
|
+#include <linux/slab.h>
|
|
|
|
|
|
#include <asm/paravirt.h>
|
|
|
|
|
@@ -165,6 +166,7 @@ static int xen_spin_trylock(struct arch_spinlock *lock)
|
|
|
return old == 0;
|
|
|
}
|
|
|
|
|
|
+static DEFINE_PER_CPU(char *, irq_name);
|
|
|
static DEFINE_PER_CPU(int, lock_kicker_irq) = -1;
|
|
|
static DEFINE_PER_CPU(struct xen_spinlock *, lock_spinners);
|
|
|
|
|
@@ -362,7 +364,7 @@ static irqreturn_t dummy_handler(int irq, void *dev_id)
|
|
|
void __cpuinit xen_init_lock_cpu(int cpu)
|
|
|
{
|
|
|
int irq;
|
|
|
- const char *name;
|
|
|
+ char *name;
|
|
|
|
|
|
WARN(per_cpu(lock_kicker_irq, cpu) >= 0, "spinlock on CPU%d exists on IRQ%d!\n",
|
|
|
cpu, per_cpu(lock_kicker_irq, cpu));
|
|
@@ -385,6 +387,7 @@ void __cpuinit xen_init_lock_cpu(int cpu)
|
|
|
if (irq >= 0) {
|
|
|
disable_irq(irq); /* make sure it's never delivered */
|
|
|
per_cpu(lock_kicker_irq, cpu) = irq;
|
|
|
+ per_cpu(irq_name, cpu) = name;
|
|
|
}
|
|
|
|
|
|
printk("cpu %d spinlock event irq %d\n", cpu, irq);
|
|
@@ -401,6 +404,8 @@ void xen_uninit_lock_cpu(int cpu)
|
|
|
|
|
|
unbind_from_irqhandler(per_cpu(lock_kicker_irq, cpu), NULL);
|
|
|
per_cpu(lock_kicker_irq, cpu) = -1;
|
|
|
+ kfree(per_cpu(irq_name, cpu));
|
|
|
+ per_cpu(irq_name, cpu) = NULL;
|
|
|
}
|
|
|
|
|
|
void __init xen_init_spinlocks(void)
|