On Wed, 3 Feb 2021, Philippe Mathieu-Daudé wrote:
LSI SCSI on PReP is the unique particular case where we use fixed IRQ routing. All other cases use regular IRQ swizzling.
Signed-off-by: Philippe Mathieu-Daudé f4bug@amsat.org
drivers/pci.c | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-)
diff --git a/drivers/pci.c b/drivers/pci.c index a2774d2..ef9a2da 100644 --- a/drivers/pci.c +++ b/drivers/pci.c @@ -1991,28 +1991,15 @@ static void ob_pci_host_bus_interrupt(ucell dnode, u32 *props, int *ncells, u32 { *ncells += pci_encode_phys_addr(props + *ncells, 0, 0, addr, 0, 0);
- if (is_apple()) {
/* Mac machines */
props[(*ncells)++] = intno;
props[(*ncells)++] = dnode;
props[(*ncells)++] = arch->irqs[((intno - 1) + (addr >> 11)) & 3];
props[(*ncells)++] = 1;
- props[(*ncells)++] = intno;
- props[(*ncells)++] = dnode;
- if (!is_apple() && (PCI_DEV(addr) == 1 && PCI_FN(addr) == 0)) {
/* On PReP machine the LSI SCSI has fixed routing to IRQ 13 */
I don't really care so feel free to ignore this comment but is there a way to check for what the comment says, i.e. we're on PReP and device vendor/product ID matches the SCSI controller, instead of what we have here that says if it's not a Mac then anything in this slot will use IRQ 13 which theoretically could match unwanted devices?
Regards, BALATON Zoltan
} else {props[(*ncells)++] = 13;
/* PReP machines */
props[(*ncells)++] = intno;
props[(*ncells)++] = dnode;
if (PCI_DEV(addr) == 1 && PCI_FN(addr) == 0) {
/* LSI SCSI has fixed routing to IRQ 13 */
props[(*ncells)++] = 13;
} else {
/* Use the same "physical" routing as QEMU's raven_map_irq() although
ultimately all 4 PCI interrupts are ORd to IRQ 15 as indicated
by the PReP specification */
props[(*ncells)++] = arch->irqs[((intno - 1) + (addr >> 11)) & 3];
}
props[(*ncells)++] = 1;
}props[(*ncells)++] = arch->irqs[((intno - 1) + (addr >> 11)) & 3];
- props[(*ncells)++] = 1;
}
#elif defined(CONFIG_SPARC64)