Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2c52f8d3 authored by Konrad Rzeszutek Wilk's avatar Konrad Rzeszutek Wilk
Browse files

x86: xen: Sanitse irq handling (part two)



Thomas Gleixner cleaned up event handling to use the
sparse_irq handling, but the xen-pcifront patches utilized the
old mechanism. This fixes them to work with sparse_irq handling.

Signed-off-by: default avatarKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
parent 2775609c
Loading
Loading
Loading
Loading
+3 −4
Original line number Original line Diff line number Diff line
@@ -586,8 +586,7 @@ int xen_allocate_pirq(unsigned gsi, int shareable, char *name)
	 * we are using the !xen_initial_domain() to drop in the function.*/
	 * we are using the !xen_initial_domain() to drop in the function.*/
	if (identity_mapped_irq(gsi) || !xen_initial_domain()) {
	if (identity_mapped_irq(gsi) || !xen_initial_domain()) {
		irq = gsi;
		irq = gsi;
		irq_to_desc_alloc_node(irq, 0);
		irq_alloc_desc_at(irq, 0);
		dynamic_irq_init(irq);
	} else
	} else
		irq = find_unbound_irq();
		irq = find_unbound_irq();


@@ -602,7 +601,7 @@ int xen_allocate_pirq(unsigned gsi, int shareable, char *name)
	 * this in the priv domain. */
	 * this in the priv domain. */
	if (xen_initial_domain() &&
	if (xen_initial_domain() &&
	    HYPERVISOR_physdev_op(PHYSDEVOP_alloc_irq_vector, &irq_op)) {
	    HYPERVISOR_physdev_op(PHYSDEVOP_alloc_irq_vector, &irq_op)) {
		dynamic_irq_cleanup(irq);
		irq_free_desc(irq);
		irq = -ENOSPC;
		irq = -ENOSPC;
		goto out;
		goto out;
	}
	}
@@ -629,7 +628,7 @@ int xen_destroy_irq(int irq)


	irq_info[irq] = mk_unbound_info();
	irq_info[irq] = mk_unbound_info();


	dynamic_irq_cleanup(irq);
	irq_free_desc(irq);


out:
out:
	spin_unlock(&irq_mapping_update_lock);
	spin_unlock(&irq_mapping_update_lock);