xen: events: separate MSI PIRQ allocation from PIRQ binding to IRQ
commitbf480d952bcf25e8ff7e95d2a23964107513ac51
authorIan Campbell <ian.campbell@citrix.com>
Fri, 18 Feb 2011 16:43:32 +0000 (18 16:43 +0000)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Thu, 10 Mar 2011 19:44:40 +0000 (10 14:44 -0500)
treeb2d1a75e39bfdf82021ccdefb5f9613a17087040
parent5cad61a6ba6f4956a218ffbb64cafcc1daefaca0
xen: events: separate MSI PIRQ allocation from PIRQ binding to IRQ

Split the binding aspect of xen_allocate_pirq_msi out into a new
xen_bind_pirq_to_irq function.

In xen_hvm_setup_msi_irq when allocating a pirq write the MSI message
to signal the PIRQ as soon as the pirq is obtained. There is no way to
free the pirq back so if the subsequent binding to an IRQ fails we
want to ensure that we will reuse the PIRQ next time rather than leak
it.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/pci/xen.c
drivers/xen/events.c
include/xen/events.h