linux/arch/x86/pci
Konrad Rzeszutek Wilk 155a16f219 xen/pci: Use the INT_SRC_OVR IRQ (instead of GSI) to preset the ACPI SCI IRQ.
In the past we would use the GSI value to preset the ACPI SCI
IRQ which worked great as GSI == IRQ:

ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 low level)

While that is most often seen, there are some oddities:

ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 20 low level)

which means that GSI 20 (or pin 20) is to be overriden for IRQ 9.
Our code that presets the interrupt for ACPI SCI however would
use the GSI 20 instead of IRQ 9 ending up with:

xen: sci override: global_irq=20 trigger=0 polarity=1
xen: registering gsi 20 triggering 0 polarity 1
xen: --> pirq=20 -> irq=20
xen: acpi sci 20
.. snip..
calling  acpi_init+0x0/0xbc @ 1
ACPI: SCI (IRQ9) allocation failed
ACPI Exception: AE_NOT_ACQUIRED, Unable to install System Control Interrupt handler (20110413/evevent-119)
ACPI: Unable to start the ACPI Interpreter

as the ACPI interpreter made a call to 'acpi_gsi_to_irq' which got nine.
It used that value to request an IRQ (request_irq) and since that was not
present it failed.

The fix is to recognize that for interrupts that are overriden (in our
case we only care about the ACPI SCI) we should use the IRQ number
to present the IRQ instead of the using GSI. End result is that we get:

xen: sci override: global_irq=20 trigger=0 polarity=1
xen: registering gsi 20 triggering 0 polarity 1
xen: --> pirq=20 -> irq=9 (gsi=9)
xen: acpi sci 9

which fixes the ACPI interpreter failing on startup.

CC: stable@kernel.org
Reported-by: Liwei <xieliwei@gmail.com>
Tested-by: Liwei <xieliwei@gmail.com>
[http://lists.xensource.com/archives/html/xen-devel/2011-06/msg01727.html]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
2011-06-30 11:23:39 -04:00
..
acpi.c x86/PCI: coalesce overlapping host bridge windows 2010-11-11 09:34:31 -08:00
amd_bus.c x86: Adjust section placement in AMD northbridge related code 2011-02-10 13:32:52 +01:00
broadcom_bus.c x86/PCI: don't use native Broadcom CNB20LE driver when ACPI is available 2011-01-14 08:55:41 -08:00
bus_numa.c Merge branch 'x86-bootmem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-03 08:15:05 -08:00
bus_numa.h Merge branch 'x86-bootmem-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2010-03-03 08:15:05 -08:00
ce4100.c Merge branch 'x86-platform-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2011-03-15 20:01:36 -07:00
common.c PCI: enable pci=bfsort by default on future Dell systems 2011-01-14 08:55:41 -08:00
direct.c x86/PCI: Convert release_resource to release_region/release_mem_region 2011-05-10 15:43:30 -07:00
early.c x86/PCI: remove early PCI pr_debug statements 2009-11-24 15:25:19 -08:00
fixup.c Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6 2009-04-01 09:47:12 -07:00
i386.c x86: Fix common misspellings 2011-03-18 10:39:30 +01:00
init.c x86, olpc: Use pci subarch init for OLPC 2010-02-25 19:26:23 -08:00
irq.c x86/PCI: irq and pci_ids patch for Intel Panther Point DeviceIDs 2011-05-10 15:43:36 -07:00
legacy.c x86/PCI: pci, fix section mismatch 2010-07-30 09:29:09 -07:00
Makefile ce4100: Add PCI register emulation for CE4100 2010-11-12 00:45:41 +01:00
mmconfig-shared.c x86/PCI: derive pcibios_last_bus from ACPI MCFG 2011-05-21 09:00:35 -07:00
mmconfig_32.c x86/PCI: Convert pci_config_lock to raw_spinlock 2010-05-11 12:01:09 -07:00
mmconfig_64.c x86/PCI: MMCONFIG: add lookup function 2009-11-24 15:30:36 -08:00
mrst.c x86, pci, mrst: Add extra sanity check in walking the PCI extended cap chain 2010-07-16 16:52:15 -07:00
numaq_32.c x86/PCI: Convert pci_config_lock to raw_spinlock 2010-05-11 12:01:09 -07:00
olpc.c PCI: OLPC: Only enable PCI configuration type override on XO-1 2010-10-15 13:09:51 -07:00
pcbios.c x86: Add NX protection for kernel data 2010-11-18 12:52:04 +01:00
visws.c x86: Move pci init function to x86_init 2010-02-19 16:12:29 -08:00
xen.c xen/pci: Use the INT_SRC_OVR IRQ (instead of GSI) to preset the ACPI SCI IRQ. 2011-06-30 11:23:39 -04:00