27 #include <xen/events.h>
39 xen_assign_irq_vector(
int irq)
51 xen_free_irq_vector(
int vector)
88 #define MAX_LATE_IRQ 16
90 static unsigned short late_irq_cnt;
91 static unsigned short saved_irq_cnt;
92 static int xen_slab_ready;
95 #include <linux/sched.h>
102 xen_dummy_handler(
int irq,
void *
dev_id)
108 xen_resched_handler(
int irq,
void *
dev_id)
114 static struct irqaction xen_ipi_irqaction = {
120 static struct irqaction xen_resched_irqaction = {
121 .
handler = xen_resched_handler,
126 static struct irqaction xen_tlb_irqaction = {
146 __xen_register_percpu_irq(
unsigned int cpu,
unsigned int vec,
151 if (xen_slab_ready) {
155 sizeof(
per_cpu(xen_timer_name, cpu)),
156 "%s%d", action->
name, cpu);
164 sizeof(
per_cpu(xen_resched_name, cpu)),
165 "%s%d", action->
name, cpu);
173 sizeof(
per_cpu(xen_ipi_name, cpu)),
174 "%s%d", action->
name, cpu);
182 sizeof(
per_cpu(xen_cmc_name, cpu)),
183 "%s%d", action->
name, cpu);
193 sizeof(
per_cpu(xen_cmcp_name, cpu)),
194 "%s%d", action->
name, cpu);
204 sizeof(
per_cpu(xen_cpep_name, cpu)),
205 "%s%d", action->
name, cpu);
242 saved_percpu_irqs[saved_irq_cnt].irq = vec;
243 saved_percpu_irqs[saved_irq_cnt].action =
action;
257 xen_bind_early_percpu_irq(
void)
265 for (i = 0; i < late_irq_cnt; i++)
267 saved_percpu_irqs[i].irq,
268 saved_percpu_irqs[i].action, 0);
275 #ifdef CONFIG_HOTPLUG_CPU
278 unsigned long action,
void *hcpu)
280 unsigned int cpu = (
unsigned long)hcpu;
284 if (
per_cpu(xen_cpep_irq, cpu) >= 0) {
287 per_cpu(xen_cpep_irq, cpu) = -1;
289 if (
per_cpu(xen_cmcp_irq, cpu) >= 0) {
292 per_cpu(xen_cmcp_irq, cpu) = -1;
294 if (
per_cpu(xen_cmc_irq, cpu) >= 0) {
296 per_cpu(xen_cmc_irq, cpu) = -1;
298 if (
per_cpu(xen_ipi_irq, cpu) >= 0) {
300 per_cpu(xen_ipi_irq, cpu) = -1;
302 if (
per_cpu(xen_resched_irq, cpu) >= 0) {
305 per_cpu(xen_resched_irq, cpu) = -1;
307 if (
per_cpu(xen_timer_irq, cpu) >= 0) {
310 per_cpu(xen_timer_irq, cpu) = -1;
327 for (i = 0; i < saved_irq_cnt; i++)
328 __xen_register_percpu_irq(cpu, saved_percpu_irqs[i].irq,
329 saved_percpu_irqs[i].action, 0);
344 #ifdef CONFIG_HOTPLUG_CPU
346 register_cpu_notifier(&unbind_evtchn_notifier);
421 xen_register_ipi(
void)
431 xen_resend_irq(
unsigned int vector)
437 .register_ipi = xen_register_ipi,
439 .assign_irq_vector = xen_assign_irq_vector,
440 .free_irq_vector = xen_free_irq_vector,
441 .register_percpu_irq = xen_register_percpu_irq,
443 .resend_irq = xen_resend_irq,