diff options
| author | Kip Macy <kmacy@FreeBSD.org> | 2008-09-26 05:54:24 +0000 |
|---|---|---|
| committer | Kip Macy <kmacy@FreeBSD.org> | 2008-09-26 05:54:24 +0000 |
| commit | 852c25eda2e5dab087370823a64fb37eca492794 (patch) | |
| tree | 87fb843f20e48fd58b6c1af6bfc4a9cd7b17d6b4 /sys/xen/evtchn | |
| parent | 3488b48a0054d0697318d3c389ae33bf2bae0643 (diff) | |
Notes
Diffstat (limited to 'sys/xen/evtchn')
| -rw-r--r-- | sys/xen/evtchn/evtchn.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/sys/xen/evtchn/evtchn.c b/sys/xen/evtchn/evtchn.c index de3cf0c05628b..53b41accb4273 100644 --- a/sys/xen/evtchn/evtchn.c +++ b/sys/xen/evtchn/evtchn.c @@ -112,14 +112,14 @@ enum { #define index_from_irq(irq) ((uint8_t)(irq_info[irq] >> 16)) #define type_from_irq(irq) ((uint8_t)(irq_info[irq] >> 24)) -/* IRQ <-> VIRQ mapping. */ -DEFINE_PER_CPU(int, virq_to_irq[NR_VIRQS]); - -/* IRQ <-> IPI mapping. */ -#ifndef NR_IPIS +/* IRQ <-> VIRQ mapping. */ +DEFINE_PER_CPU(int, virq_to_irq[NR_VIRQS]) = {[0 ... NR_VIRQS-1] = -1}; + +/* IRQ <-> IPI mapping. */ +#ifndef NR_IPIS #define NR_IPIS 1 -#endif -DEFINE_PER_CPU(int, ipi_to_irq[NR_IPIS]); +#endif +DEFINE_PER_CPU(int, ipi_to_irq[NR_IPIS]) = {[0 ... NR_IPIS-1] = -1}; /* Bitmap indicating which PIRQs require Xen to be notified on unmask. */ static unsigned long pirq_needs_unmask_notify[NR_PIRQS/sizeof(unsigned long)]; @@ -219,6 +219,14 @@ evtchn_do_upcall(struct trapframe *frame) } } +void +ipi_pcpu(unsigned int cpu, int vector) +{ + int irq = per_cpu(ipi_to_irq, cpu)[vector]; + + notify_remote_via_irq(irq); +} + static int find_unbound_irq(void) { |
