[PATCH 12/26] x86 kernel apic: notify MSI irqdomain(s) on etup/teardown of MSI IRQs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




This patch should have no effect on non-OF x86 machines.

When CONFIG_OF is enabled, an irqdomain exists for each MSI controller
in the devicetree. This patch invokes the functions taking care of
adding/removing IRQs numbers to/from the MSI irqdomain they belong to.

Signed-off-by: Davide Ciminaghi <ciminaghi@xxxxxxxxx>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@xxxxxx>
---
 arch/x86/kernel/apic/io_apic.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 9ed796c..65db413 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -60,6 +60,7 @@
 #include <asm/irq_remapping.h>
 #include <asm/hpet.h>
 #include <asm/hw_irq.h>
+#include <asm/prom.h>
 
 #include <asm/apic.h>
 
@@ -3154,6 +3155,9 @@ int native_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
 		ret = setup_msi_irq(dev, msidesc, irq, 0);
 		if (ret < 0)
 			goto error;
+		ret = x86_of_new_msi_irq(dev, irq);
+		if (ret < 0)
+			goto error;
 	}
 	return 0;
 
@@ -3164,6 +3168,7 @@ error:
 
 void native_teardown_msi_irq(unsigned int irq)
 {
+	x86_of_del_msi_irq(irq);
 	destroy_irq(irq);
 }
 
-- 
1.7.7.2
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux