Mercurial > hg > aboriginal
changeset 1588:7bf850767bb8
The arm guys have now screwed up the ARM versatile board's IRQ routing three consecutive times. I'm impressed.
The ARM versatile scsi IRQ is position 27 on the IRQ controller. That's what
QEMU implemented, that's what worked for years. In commit 1bc39ac5dab2 the
kernel guys screwed up their math (among other things doing -24 and then &3
on the result.. can we say NOP?) so it was now trying to use IRQ 28 once
the unnecessary "swizzle" function got done with it. (I started reverting
that 6 months ago in aboriginal changeset 1534.) Then in commit f5565295892e
they incremented the IRQ controller start by 32... and didn't adjust map_irq()
so it was still requesting 28, now before the start of the IRQ
controller's range. Then in commit e3e92a7be693 they noticed it was
broken, and added 64 to it. (So now it's requesting 64+28=92, when it
_should_ be requesting 32+27=59. Their own description of what changed does
not support what the patch did, and yet...)
Of _course_ they didn't test the result and notice it doesn't work. Even
though qemu is there, and worked for years before they started messing
with it.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 14 Mar 2013 23:12:25 -0500 |
parents | 0eb16db33d9d |
children | 96fb8598a446 |
files | sources/patches/linux-arm.patch |
diffstat | 1 files changed, 30 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/sources/patches/linux-arm.patch Thu Mar 14 08:28:23 2013 -0500 +++ b/sources/patches/linux-arm.patch Thu Mar 14 23:12:25 2013 -0500 @@ -25,30 +25,6 @@ help Include support for the ARM(R) Versatile Application Baseboard for the ARM926EJ-S. -diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c -index e95bf84..c7f47fc 100644 ---- a/arch/arm/mach-versatile/pci.c -+++ b/arch/arm/mach-versatile/pci.c -@@ -346,12 +346,18 @@ static int __init versatile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) - * 26 1 29 - * 27 1 30 - */ -- irq = 27 + ((slot - 24 + pin - 1) & 3); -+ irq = 27 + ((slot + pin - 1) & 3); - - return irq; - } - -+static u8 __init versatile_swizzle(void) -+{ -+ return 0; -+} -+ - static struct hw_pci versatile_pci __initdata = { -+ .swizzle = (void *)versatile_swizzle, - .map_irq = versatile_map_irq, - .nr_controllers = 1, - .ops = &pci_versatile_ops, diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 101b968..70de9fd 100644 --- a/arch/arm/mm/Kconfig @@ -114,3 +90,33 @@ config ARCH_VERSATILE_PB bool "Support Versatile Platform Baseboard for ARM926EJ-S" default y +diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c +index 2f84f40..af54581 100644 +--- a/arch/arm/mach-versatile/pci.c ++++ b/arch/arm/mach-versatile/pci.c +@@ -23,6 +23,7 @@ + #include <linux/io.h> + + #include <mach/hardware.h> ++#include <mach/irqs.h> + #include <asm/irq.h> + #include <asm/mach/pci.h> + +@@ -327,12 +328,12 @@ static int __init versatile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) + int irq; + + /* slot, pin, irq +- * 24 1 27 +- * 25 1 28 +- * 26 1 29 +- * 27 1 30 ++ * 24 1 IRQ_SIC_PCI0 ++ * 25 1 IRQ_SIC_PCI1 ++ * 26 1 IRQ_SIC_PCI2 ++ * 27 1 IRQ_SIC_PCI3 + */ +- irq = 27 + ((slot - 24 + pin - 1) & 3); ++ irq = IRQ_VIC_START + SIC_INT_PCI0 + ((slot + pin - 2) & 3); + + return irq; + }