]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI,PCI,IRQ: factor in PCI possible
authorSinan Kaya <okaya@codeaurora.org>
Wed, 29 Jun 2016 08:27:35 +0000 (04:27 -0400)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 1 Jul 2016 23:38:34 +0000 (01:38 +0200)
commit4b11b8f1faba644bec99fb22841f3bb1cf2b754d
tree56c64f7c97a006288ca0bbb40068c6c8ae8fa574
parente2a2c68cee87a3601641f76ed37c490a46c88d47
ACPI,PCI,IRQ: factor in PCI possible

The change introduced in commit ad3ac7145abb (ACPI,PCI,IRQ: reduce
resource requirements) omitted the initially applied PCI_POSSIBLE
penalty when the IRQ is active.

Incorrect calculation of the penalty leads the ACPI code to assigning
a wrong interrupt number to a PCI INTx interrupt.

This would not be as bad as it sounds in theory.  It would just cause
the interrupts to be shared and result in performance penalty.

However, some drivers (like the parallel port driver) don't like
interrupt sharing and in the above case they will causes all of
the PCI drivers wanting to share the interrupt to be unable to
request it.

The issue has not been caught in testing because the behavior is
platform-specific and depends on the peripherals ending up sharing
the IRQ and their drivers.

Before the above commit the code would add the PCI_POSSIBLE value
divided by the number of possible IRQ users to the IRQ penalty
during initialization.

Later in that code path, if the IRQ is chosen as the active IRQ or
if it is used by ISA; additional penalties are added.

Fixes: ad3ac7145abb (ACPI,PCI,IRQ: reduce resource requirements)
Signed-off-by: Sinan Kaya <okaya@codeaurora.org>
Tested-by: Wim Osterholt <wim@djo.tudelft.nl>
[ rjw: Changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/pci_link.c