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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/29/2016 9:49 AM, Ondrej Zary wrote:
>> Ok, since I have not seen the full boot log I am guessing that isa api
>> > gets called before the link objects are initialized.
> Netconsole did not work (probably because it crashes too early?) and I don't 
> have a null-modem cable.
> 

Probably, this is telling me that using the link list to determine penalties for
ISA penalties is a bad idea as the ISA API seems to be called from arbitrary
contexts even before the ACPI Link objects are created. 

I was trying to reuse the PCI execution path for ISA interrupts using the last
two patches. I dropped the first and last two patches and restored the penalty PCI
penalty assignment for the active interrupt only if the interrupt is a ISA interrupt
with a new patch.

>> > Can you appply the first three only (0001, 0002 and 0003) to see if it
>> > makes a difference?
> It boots with first 3 patches only but the problem remains - see the attached 
> log.

Let's see the new set. If this doesn't work, I'll have to provide you with another
patch to get the penalty counts again. The original debug aids patch may not apply
after these.




-- 
Sinan Kaya
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.
>From 82278a843e968ed98f18cd7a3cca515aabe2ab3a Mon Sep 17 00:00:00 2001
From: Sinan Kaya <okaya@xxxxxxxxxxxxxx>
Date: Wed, 28 Sep 2016 19:08:34 -0400
Subject: [PATCH 1/2] ACPI, PCI, IRQ: remove double penalty calculation

acpi_irq_get_penalty returns the penalty for both PCI and ISA penalties.
Now that we don't have any storage place for PCI IRQs, we run into some
math problem such as follows:

The original code was as simple as this:
acpi_isa_irq_penalty += penalty

In order to hide PCI IRQ calculation difference vs. ISA IRQ difference, we
created the acpi_irq_get_penalty function and replaced the above statement
as

acpi_isa_irq_penalty = acpi_irq_get_penalty() + penalty

This is what acpi_irq_get_penalty returns.

acpi_irq_get_penalty()= acpi_isa_irq_penalty + SCI penalty

When you call acpi_penalize_isa_irq twice, you end up with:

acpi_isa_irq_penalty = 2 * SCI penalty + acpi_isa_irq_penalty

Fixing this by directly modifying acpi_isa_irq_penalty for the new penalty
added.

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

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index c983bf7..59326ac 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -870,9 +870,10 @@ static int __init acpi_irq_penalty_update(char *str, int used)
  */
 void acpi_penalize_isa_irq(int irq, int active)
 {
+	int penalty = active ? PIRQ_PENALTY_ISA_USED : PIRQ_PENALTY_PCI_USING;
+
 	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);
+		acpi_isa_irq_penalty[irq] += penalty;
 }
 
 bool acpi_isa_irq_available(int irq)
-- 
1.9.1

>From 163255c91635d5e85dc71724b86def80ff433b88 Mon Sep 17 00:00:00 2001
From: Sinan Kaya <okaya@xxxxxxxxxxxxxx>
Date: Thu, 29 Sep 2016 10:25:21 -0400
Subject: [PATCH 2/2] ACPI, PCI IRQ: add PCI_USING penalty for ISA interrupts

The change introduced in commit 103544d86976 ("ACPI,PCI,IRQ: reduce
resource requirements") removed PCI_USING penalty from
acpi_pci_link_allocate function as there is no longer a fixed size penalty
array for both PCI and IRQ interrupts.

We need to add the PCI_USING penalty for ISA interrupts too if the link is
in use and matches our ISA IRQ number.

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

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 59326ac..47407cb 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -619,6 +619,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
 			    acpi_device_bid(link->device));
 		return -ENODEV;
 	} else {
+		if (irq < ACPI_MAX_ISA_IRQS)
+			acpi_isa_irq_penalty[link->irq.active] +=
+				PIRQ_PENALTY_PCI_USING;
+
 		printk(KERN_WARNING PREFIX "%s [%s] enabled at IRQ %d\n",
 		       acpi_device_name(link->device),
 		       acpi_device_bid(link->device), link->irq.active);
-- 
1.9.1


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux