[PATCH 3/4] ACPI,PCI,IRQ: separate ISA penalty calculation
From: Sinan Kaya
Date: Fri Jun 24 2016 - 01:31:04 EST
Since commit 103544d86976 ("ACPI,PCI,IRQ: reduce resource requirements")
the penalty values are calculated on the fly rather than boot time.
This works fine for PCI interrupts but not so well for the ISA interrupts.
Whether an ISA interrupt is in use or not information is not available
inside the pci_link.c file. This information gets sent externally via
acpi_penalize_isa_irq function. If active is true, then the IRQ is in use
by ISA. Otherwise, IRQ is in use by PCI.
Since the current code relies on PCI Link object for determination of
penalties, we are factoring in the PCI penalty twice after
acpi_penalize_isa_irq function is called.
This change is limiting the newly added functionality to just PCI
interrupts so that old behavior is still maintained.
Signed-off-by: Sinan Kaya <okaya@xxxxxxxxxxxxxx>
---
drivers/acpi/pci_link.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 714ba4d..c2f22c9 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -497,7 +497,7 @@ static int acpi_irq_get_penalty(int irq)
int penalty = 0;
if (irq < ACPI_MAX_ISA_IRQS)
- penalty += acpi_isa_irq_penalty[irq];
+ return acpi_isa_irq_penalty[irq];
/*
* Penalize IRQ used by ACPI SCI. If ACPI SCI pin attributes conflict
--
1.8.2.1
--------------A185EFCCD04DA26A1BD169FB
Content-Type: text/plain; charset=UTF-8;
name="0004-ACPI-PCI-IRQ-correct-operator-precedence.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0004-ACPI-PCI-IRQ-correct-operator-precedence.patch"