Message ID | e90fb01a-77e3-a094-9631-0b703972c750@codeaurora.org (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On 9/29/2016 10:28 AM, Sinan Kaya wrote: > + if (irq < ACPI_MAX_ISA_IRQS) BTW, can you change this line to if (link->irq.active < ACPI_MAX_ISA_IRQS) after applying. > + acpi_isa_irq_penalty[link->irq.active] += > + PIRQ_PENALTY_PCI_USING;
On Thursday 29 September 2016 16:28:23 Sinan Kaya wrote: > 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. It boots but the IRQ problem still remains the same. See the attached logs: dmesg-bad.txt: without the irq -> link->irq.active change dmesg-bad2.txt: with the irq -> link->irq.active change dmesg-bad2-debug.txt: as above with modified debug patch @@ -876,8 +893,11 @@ 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))) + if ((irq >= 0) && (irq < ARRAY_SIZE(acpi_isa_irq_penalty))) { acpi_isa_irq_penalty[irq] += penalty; + pr_info("%s:%d acpi_isa_irq_penalty[%d]=0x%x active = %d\n", __func__, + __LINE__, irq, acpi_irq_get_penalty(irq), active); + } }
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)