diff mbox

4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off

Message ID 76303bb8-7ae2-9a6b-8e5d-a144ae7c6009@codeaurora.org
State Not Applicable
Headers show

Commit Message

Sinan Kaya Sept. 28, 2016, 6:22 p.m. UTC
On 9/28/2016 1:02 PM, Ondrej Zary wrote:
>> Thanks, It sounds like you have more than one machine with similar
>> > problems. Can you collect the log from the other machines with 4.8-rc8?
>> >
>> > and also a boot log with 4.6 kernel where things are working?
> The attached logs are from another machine:
> 
> dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad
> 
> dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's suggestion) 
> reverted - good
> 
> dmesg-3.6.txt: 4.6 (Debian kernel) - good

I think I see a race condition for the SCI interrupt. I need another dump from
4.8-rc8 with the attached patch to confirm. Let's remove the previous one and
apply this one.

Comments

Ondrej Zary Sept. 28, 2016, 7:23 p.m. UTC | #1
On Wednesday 28 September 2016 20:22:40 Sinan Kaya wrote:
> On 9/28/2016 1:02 PM, Ondrej Zary wrote:
> >> Thanks, It sounds like you have more than one machine with similar
> >>
> >> > problems. Can you collect the log from the other machines with
> >> > 4.8-rc8?
> >> >
> >> > and also a boot log with 4.6 kernel where things are working?
> >
> > The attached logs are from another machine:
> >
> > dmesg-bad-debug.txt: 4.8-rc8 with your debug patch - bad
> >
> > dmesg-reverted.txt: 4.8-rc8 with patches (as per Rafael's suggestion)
> > reverted - good
> >
> > dmesg-3.6.txt: 4.6 (Debian kernel) - good
>
> I think I see a race condition for the SCI interrupt. I need another dump
> from 4.8-rc8 with the attached patch to confirm. Let's remove the previous
> one and apply this one.

dmesg-reverted.txt: 4.8-rc8 w/patches reverted (good)
$ head /proc/interrupts
           CPU0
  0:       8531    XT-PIC  timer
  1:          9    XT-PIC  i8042
  2:          0    XT-PIC  cascade
  8:          1    XT-PIC  rtc0
 11:        713    XT-PIC  acpi, uhci_hcd:usb1, uhci_hcd:usb2, nvkm, eth0
 12:        161    XT-PIC  i8042
 14:       4042    XT-PIC  pata_via
 15:          0    XT-PIC  pata_via
NMI:          0   Non-maskable interrupts

dmesg-bad-debug.txt: 4.8-rc8 (bad)
$ head /proc/interrupts
           CPU0
  0:       8027    XT-PIC  timer
  1:        286    XT-PIC  i8042
  2:          0    XT-PIC  cascade
  8:          1    XT-PIC  rtc0
 10:          0    XT-PIC  uhci_hcd:usb1, uhci_hcd:usb2
 11:          0    XT-PIC  acpi, nvkm, eth0
 12:        161    XT-PIC  i8042
 14:       4069    XT-PIC  pata_via
 15:          0    XT-PIC  pata_via

(I'm moving between different machines through the day - these logs are from 
different machine than the last ones).
diff mbox

Patch

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index c983bf7..92a6506 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -508,6 +508,8 @@  static int acpi_irq_get_penalty(int irq)
 			penalty += PIRQ_PENALTY_ISA_ALWAYS;
 		else
 			penalty += PIRQ_PENALTY_PCI_USING;
+
+		pr_info("%s:%d adding SCI penalty: 0x%x \n", __func__, __LINE__, penalty);
 	}
 
 	if (irq < ACPI_MAX_ISA_IRQS)
@@ -592,6 +594,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
@@ -599,11 +605,22 @@  static int acpi_pci_link_allocate(struct acpi_pci_link *link)
 		 */
 		for (i = (link->irq.possible_count - 1); i >= 0; i--) {
 			if (acpi_irq_get_penalty(irq) >
-			    acpi_irq_get_penalty(link->irq.possible[i]))
+			    acpi_irq_get_penalty(link->irq.possible[i])) {
+				pr_info("acpi_irq_get_penalty(%d) : 0x%x\n", link->irq.possible[i], acpi_irq_get_penalty(link->irq.possible[i]));
+				pr_info("acpi_irq_get_penalty(%d) : 0x%x\n", irq, acpi_irq_get_penalty(irq));
 				irq = link->irq.possible[i];
+			    }
 		}
 	}
 	if (acpi_irq_get_penalty(irq) >= PIRQ_PENALTY_ISA_ALWAYS) {
+		for (i = (link->irq.possible_count - 1); i >= 0; i--) {
+			pr_info("penalty[%d] = 0x%x\n",
+					link->irq.possible[i],
+			    acpi_irq_get_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);
+
 		printk(KERN_ERR PREFIX "No IRQ available for %s [%s]. "
 			    "Try pci=noacpi or acpi=off\n",
 			    acpi_device_name(link->device),
@@ -870,9 +887,12 @@  static int __init acpi_irq_penalty_update(char *str, int used)
  */
 void acpi_penalize_isa_irq(int irq, int active)
 {
-	if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty)))
+	if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty))) {
 		acpi_isa_irq_penalty[irq] = acpi_irq_get_penalty(irq) +
 		  (active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING);
+		pr_info("%s:%d acpi_isa_irq_penalty[%d]=0x%x active = %d\n", __func__,
+				__LINE__, irq,  acpi_irq_get_penalty(irq), active);
+	}
 }
 
 bool acpi_isa_irq_available(int irq)