]> git.proxmox.com Git - qemu.git/commit
versatile_pci: Implement the correct PCI IRQ mapping
authorPeter Maydell <peter.maydell@linaro.org>
Fri, 19 Apr 2013 10:15:19 +0000 (11:15 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 19 Apr 2013 10:15:19 +0000 (11:15 +0100)
commit66a96d7018b9cbabb73c9b87b62a37e4cc46580a
tree9f6dbc0b663c0d83a4252d6732e5df4f628a5c90
parent5f37ef92b7690423ac6311d3c597e182fc5f8fe6
versatile_pci: Implement the correct PCI IRQ mapping

Implement the correct IRQ mapping for the Versatile PCI controller; it
differs between realview and versatile boards, but the previous QEMU
implementation was correct only for the first PCI card on a versatile
board, since we weren't swizzling IRQs based on the slot number.

Since this change would otherwise break any uses of PCI on Linux kernels
which have an equivalent bug (since they have effectively only been
tested against QEMU, not real hardware), we implement a mechanism
for automatically detecting those broken kernels and switching back
to the old mapping. This works by looking at the values the kernel
writes to the PCI_INTERRUPT_LINE register in the config space, which
is effectively the interrupt number the kernel expects the device
to be using.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/pci-host/versatile.c