I am not a driver programmer, I don't have a clear picture of how linux assign irq number for pcie devices.
From an NIC driver example, it seems Linux already know which irq number should be used before the function of 'probe' or 'open' was executed.
err = ixgbe_request_irq(adapter);
ixgbe can get irq number by using the data of the 'adapter' variable, it means the irq value already inside adapter structure, it is not a generated number, it is an already existed value.
if it is read from pci/pcie configuration space, wasn't it very easy to conflict with other devices?
if it is generated/arrange by kernel, how the irq number already inside the 'adapter' variable? ( or it is assigned by BIOS ? )
For interrupt for MSI, it seems generated by kernel ??
In my understanding, the irq number should be read from Interrupt Line Register (offset 3Ch) in PCIe configuration space, I guess that's why kerenl already know which irq number should be used, and Interrupt Line Register should be updated by BIOS ( my guess ) during boot, but there still a virtual IRQ ( when lspci without -b ), and seems MSI has another irq (?), are they common resource like memory to be arranged ?