Skip to content

Commit

Permalink
xen: add resend_irq_on_evtchn() definition into events.c
Browse files Browse the repository at this point in the history
Define resend_irq_on_evtchn() which ia64/xen uses.
Although it isn't used by current x86/xen code, it's arch generic
so that put it into common code.

Signed-off-by: Isaku Yamahata <[email protected]>
Signed-off-by: Jeremy Fitzhardinge <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
  • Loading branch information
Isaku Yamahata authored and Ingo Molnar committed Apr 24, 2008
1 parent e849c3e commit 642e0c8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
16 changes: 16 additions & 0 deletions drivers/xen/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,6 +586,22 @@ static void set_affinity_irq(unsigned irq, cpumask_t dest)
rebind_irq_to_cpu(irq, tcpu);
}

int resend_irq_on_evtchn(unsigned int irq)
{
int masked, evtchn = evtchn_from_irq(irq);
struct shared_info *s = HYPERVISOR_shared_info;

if (!VALID_EVTCHN(evtchn))
return 1;

masked = sync_test_and_set_bit(evtchn, s->evtchn_mask);
sync_set_bit(evtchn, s->evtchn_pending);
if (!masked)
unmask_evtchn(evtchn);

return 1;
}

static void enable_dynirq(unsigned int irq)
{
int evtchn = evtchn_from_irq(irq);
Expand Down
1 change: 1 addition & 0 deletions include/xen/events.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ int bind_ipi_to_irqhandler(enum ipi_vector ipi,
void unbind_from_irqhandler(unsigned int irq, void *dev_id);

void xen_send_IPI_one(unsigned int cpu, enum ipi_vector vector);
int resend_irq_on_evtchn(unsigned int irq);

static inline void notify_remote_via_evtchn(int port)
{
Expand Down

0 comments on commit 642e0c8

Please sign in to comment.