[PATCH] ACPI, PCI, IRQ: debug aids for 4.6
From: Sinan Kaya
Date: Thu Sep 29 2016 - 13:16:49 EST
Change-Id: I9c6170034ec30f04372315de3076f610f7e87668
---
drivers/acpi/pci_link.c | 21 ++++++++++++++++++++-
1 file changed, 20 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index ededa90..0bd51f0 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -541,6 +541,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
else
irq = link->irq.possible[link->irq.possible_count - 1];
+ pr_info("irq : %d\n", irq);
+ pr_info("acpi_irq_balance : %d\n", acpi_irq_balance);
+ pr_info("link->irq.active : %d\n", link->irq.active);
+ pr_info("acpi_gbl_FADT.sci_interrupt : %d\n", acpi_gbl_FADT.sci_interrupt);
if (acpi_irq_balance || !link->irq.active) {
/*
* Select the best IRQ. This is done in reverse to promote
@@ -548,10 +552,21 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
*/
for (i = (link->irq.possible_count - 1); i >= 0; i--) {
if (acpi_irq_penalty[irq] >
- acpi_irq_penalty[link->irq.possible[i]])
+ acpi_irq_penalty[link->irq.possible[i]]) {
+ pr_info("acpi_irq_get_penalty(%d) : 0x%x\n", link->irq.possible[i], acpi_irq_penalty[link->irq.possible[i]]);
+ pr_info("acpi_irq_get_penalty(%d) : 0x%x\n", irq, acpi_irq_penalty[irq]);
irq = link->irq.possible[i];
+ }
}
}
+ for (i = (link->irq.possible_count - 1); i >= 0; i--) {
+ pr_info("penalty[%d] = 0x%x\n",
+ link->irq.possible[i],
+ acpi_irq_penalty[link->irq.possible[i]]);
+ }
+ pr_info("irq : %d\n", irq);
+ pr_info("acpi_gbl_FADT.sci_interrupt : %d\n", acpi_gbl_FADT.sci_interrupt);
+
if (acpi_irq_penalty[irq] >= PIRQ_PENALTY_ISA_ALWAYS) {
printk(KERN_ERR PREFIX "No IRQ available for %s [%s]. "
"Try pci=noacpi or acpi=off\n",
@@ -569,6 +584,7 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
return -ENODEV;
} else {
acpi_irq_penalty[link->irq.active] += PIRQ_PENALTY_PCI_USING;
+ pr_info("acpi_irq_get_penalty(%d) : 0x%x\n", link->irq.active, acpi_irq_penalty[link->irq.active]);
printk(KERN_WARNING PREFIX "%s [%s] enabled at IRQ %d\n",
acpi_device_name(link->device),
acpi_device_bid(link->device), link->irq.active);
@@ -824,6 +840,9 @@ void acpi_penalize_isa_irq(int irq, int active)
acpi_irq_penalty[irq] += PIRQ_PENALTY_ISA_USED;
else
acpi_irq_penalty[irq] += PIRQ_PENALTY_PCI_USING;
+
+ pr_info("%s:%d acpi_isa_irq_penalty[%d]=0x%x active = %d\n", __func__,
+ __LINE__, irq, acpi_irq_penalty[irq], active);
}
}
--
1.9.1
--------------EDEE035209F4AB984312D6F5--