Hello Itzik Chaimov,
1. In your device driver of PCIe device, call pci_enable_msi to enable it.
A successful call allocates ONE interrupt to the device, regardless of how many MSIs the device supports. The device is switched from pin-based interrupt mode to MSI mode. The dev->irq number is changed to a new number which represents the message signaled interrupt; consequently, this function should be called before the driver calls request_irq(), because an MSI is delivered via a vector that is different from the vector of a pin-based interrupt.
You could refer to "e1000_test_msi_interrupt" in drivers/net/ethernet/intel/e1000e/netdev.c.
err = pci_enable_msi(adapter->pdev);
if (err)
goto msi_test_failed;
err = request_irq(adapter->pdev->irq, e1000_intr_msi_test, 0,
netdev->name, netdev);
if (err) {
pci_disable_msi(adapter->pdev);
goto msi_test_failed;
}
2.Enable CONFIG_PCI_MSI in Linux Kernel configuration file.
In the dts file, qoriq-mpic4.3.dtsi has already been include in b4si-post.dtsi, which includes the following section.
The kernel will use one of interrupts as physical interrupt number, which defined in"msi@41600"
msi0: msi@41600 {
compatible = "fsl,mpic-msi-v4.3";
reg = <0x41600 0x200 0x44148 4>;
interrupts = <
0xe0 0 0 0
0xe1 0 0 0
0xe2 0 0 0
0xe3 0 0 0
0xe4 0 0 0
0xe5 0 0 0
0xe6 0 0 0
0xe7 0 0 0
0x100 0 0 0
0x101 0 0 0
0x102 0 0 0
0x103 0 0 0
0x104 0 0 0
0x105 0 0 0
0x106 0 0 0
0x107 0 0 0>;
};
3. Please check your kernel code to identify how the kernel to allocate one of MSI interrupts for your PCIe device. And how the kernel to write"MSI Message Address"and"MSI Message Data"in PCIe configuration space of your device in function fsl_setup_msi_irqs() in arch/powerpc/sysdev/fsl_msi.c.
Thanks,
Yiping