[PATCH 3/4] ACPI,PCI,IRQ: add PCI possible only for PCI interrupts

From: Sinan Kaya
Date: Wed Sep 28 2016 - 18:56:48 EST


acpi_irq_penalty_init is pre-calculating PCI_POSSIBLE penalty for
ISA interrupts at power up. Remove this from PCI dynamic penalty
path.

Signed-off-by: Sinan Kaya <okaya@xxxxxxxxxxxxxx>
---
drivers/acpi/pci_link.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index df58153..a7068a4 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -481,13 +481,15 @@ static int acpi_irq_pci_sharing_penalty(int irq)
(link->irq.initialized == 1))
penalty += PIRQ_PENALTY_PCI_USING;

- /*
- * penalize the IRQs PCI might use, but not as severely.
- */
- for (i = 0; i < link->irq.possible_count; i++)
- if (link->irq.possible[i] == irq)
- penalty += PIRQ_PENALTY_PCI_POSSIBLE /
- link->irq.possible_count;
+ if (link->irq.possible[i] >= ACPI_MAX_ISA_IRQS) {
+ /*
+ * penalize the IRQs PCI might use, but not as severely.
+ */
+ for (i = 0; i < link->irq.possible_count; i++)
+ if (link->irq.possible[i] == irq)
+ penalty += PIRQ_PENALTY_PCI_POSSIBLE /
+ link->irq.possible_count;
+ }
}

return penalty;
--
1.9.1


--------------97707A6EB943ECEA41FEED52
Content-Type: text/plain; charset=UTF-8;
name="0004-ACPI-PCI-IRQ-add-PCI_USING-for-ISA-interrupts-too.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0004-ACPI-PCI-IRQ-add-PCI_USING-for-ISA-interrupts-too.patch"