spinlock.c (dca3a783400a18e2bf4503b1d4a85c4d0ca1a7e4) | spinlock.c (cb9c6f15f318aa3aeb62fe525aa5c6dcf6eee159) |
---|---|
1/* 2 * Split spinlock implementation out into its own file, so it can be 3 * compiled in a FTRACE-compatible way. 4 */ 5#include <linux/kernel_stat.h> 6#include <linux/spinlock.h> 7#include <linux/debugfs.h> 8#include <linux/log2.h> --- 350 unchanged lines hidden (view full) --- 359 return IRQ_HANDLED; 360} 361 362void __cpuinit xen_init_lock_cpu(int cpu) 363{ 364 int irq; 365 const char *name; 366 | 1/* 2 * Split spinlock implementation out into its own file, so it can be 3 * compiled in a FTRACE-compatible way. 4 */ 5#include <linux/kernel_stat.h> 6#include <linux/spinlock.h> 7#include <linux/debugfs.h> 8#include <linux/log2.h> --- 350 unchanged lines hidden (view full) --- 359 return IRQ_HANDLED; 360} 361 362void __cpuinit xen_init_lock_cpu(int cpu) 363{ 364 int irq; 365 const char *name; 366 |
367 WARN(per_cpu(lock_kicker_irq, cpu) > 0, "spinlock on CPU%d exists on IRQ%d!\n", 368 cpu, per_cpu(lock_kicker_irq, cpu)); 369 |
|
367 name = kasprintf(GFP_KERNEL, "spinlock%d", cpu); 368 irq = bind_ipi_to_irqhandler(XEN_SPIN_UNLOCK_VECTOR, 369 cpu, 370 dummy_handler, 371 IRQF_DISABLED|IRQF_PERCPU|IRQF_NOBALANCING, 372 name, 373 NULL); 374 375 if (irq >= 0) { 376 disable_irq(irq); /* make sure it's never delivered */ 377 per_cpu(lock_kicker_irq, cpu) = irq; 378 } 379 380 printk("cpu %d spinlock event irq %d\n", cpu, irq); 381} 382 383void xen_uninit_lock_cpu(int cpu) 384{ 385 unbind_from_irqhandler(per_cpu(lock_kicker_irq, cpu), NULL); | 370 name = kasprintf(GFP_KERNEL, "spinlock%d", cpu); 371 irq = bind_ipi_to_irqhandler(XEN_SPIN_UNLOCK_VECTOR, 372 cpu, 373 dummy_handler, 374 IRQF_DISABLED|IRQF_PERCPU|IRQF_NOBALANCING, 375 name, 376 NULL); 377 378 if (irq >= 0) { 379 disable_irq(irq); /* make sure it's never delivered */ 380 per_cpu(lock_kicker_irq, cpu) = irq; 381 } 382 383 printk("cpu %d spinlock event irq %d\n", cpu, irq); 384} 385 386void xen_uninit_lock_cpu(int cpu) 387{ 388 unbind_from_irqhandler(per_cpu(lock_kicker_irq, cpu), NULL); |
389 per_cpu(lock_kicker_irq, cpu) = -1; |
|
386} 387 388void __init xen_init_spinlocks(void) 389{ 390 BUILD_BUG_ON(sizeof(struct xen_spinlock) > sizeof(arch_spinlock_t)); 391 392 pv_lock_ops.spin_is_locked = xen_spin_is_locked; 393 pv_lock_ops.spin_is_contended = xen_spin_is_contended; --- 60 unchanged lines hidden --- | 390} 391 392void __init xen_init_spinlocks(void) 393{ 394 BUILD_BUG_ON(sizeof(struct xen_spinlock) > sizeof(arch_spinlock_t)); 395 396 pv_lock_ops.spin_is_locked = xen_spin_is_locked; 397 pv_lock_ops.spin_is_contended = xen_spin_is_contended; --- 60 unchanged lines hidden --- |