mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
xen: map MSIs into pirqs
Map MSIs into pirqs, writing 0 in the MSI vector data field and the pirq number in the MSI destination id field. Signed-off-by: Stefano Stabellini <[email protected]> Reviewed-by: Konrad Rzeszutek Wilk <[email protected]>
This commit is contained in:
parent
3942b740e5
commit
809f9267bb
3 changed files with 81 additions and 0 deletions
|
|
@ -656,6 +656,28 @@ out:
|
|||
return irq;
|
||||
}
|
||||
|
||||
void xen_allocate_pirq_msi(char *name, int *irq, int *pirq)
|
||||
{
|
||||
spin_lock(&irq_mapping_update_lock);
|
||||
|
||||
*irq = find_unbound_irq();
|
||||
if (*irq == -1)
|
||||
goto out;
|
||||
|
||||
*pirq = find_unbound_pirq();
|
||||
if (*pirq == -1)
|
||||
goto out;
|
||||
|
||||
set_irq_chip_and_handler_name(*irq, &xen_pirq_chip,
|
||||
handle_level_irq, name);
|
||||
|
||||
irq_info[*irq] = mk_pirq_info(0, *pirq, 0, 0);
|
||||
pirq_to_irq[*pirq] = *irq;
|
||||
|
||||
out:
|
||||
spin_unlock(&irq_mapping_update_lock);
|
||||
}
|
||||
|
||||
int xen_destroy_irq(int irq)
|
||||
{
|
||||
struct irq_desc *desc;
|
||||
|
|
|
|||
Loading…
Reference in a new issue