From patchwork Thu Sep 29 17:18:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 9356819 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CBD9A6086A for ; Thu, 29 Sep 2016 17:18:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B8E9329BD0 for ; Thu, 29 Sep 2016 17:18:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AD81029BD5; Thu, 29 Sep 2016 17:18:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_TVD_MIME_EPI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4062329BD1 for ; Thu, 29 Sep 2016 17:18:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934267AbcI2RSs (ORCPT ); Thu, 29 Sep 2016 13:18:48 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:50502 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934253AbcI2RSr (ORCPT ); Thu, 29 Sep 2016 13:18:47 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E53F061732; Thu, 29 Sep 2016 17:18:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1475169526; bh=JYaDKFrCe6HEUMaDpoeBafPHlBwXQvJH4+jiGvwa660=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=Cpfqp5Mh4Dx1LXUwbtLvFb2+43zx6tXtFizthkCGS2xKH42rcX50oYWLrl407Wcw6 eekKX+JL0mWq8PjnLRhikZubzPlYG4kgbLGavMXnjlhexhGEdH057Ss9sRBhMr/X5E 6RnZdi5I32d9+3aJZyk/C25tXItqSgR84diiONUI= Received: from [10.228.68.92] (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 29A6161732; Thu, 29 Sep 2016 17:18:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1475169526; bh=JYaDKFrCe6HEUMaDpoeBafPHlBwXQvJH4+jiGvwa660=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=Cpfqp5Mh4Dx1LXUwbtLvFb2+43zx6tXtFizthkCGS2xKH42rcX50oYWLrl407Wcw6 eekKX+JL0mWq8PjnLRhikZubzPlYG4kgbLGavMXnjlhexhGEdH057Ss9sRBhMr/X5E 6RnZdi5I32d9+3aJZyk/C25tXItqSgR84diiONUI= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 29A6161732 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=pass smtp.mailfrom=okaya@codeaurora.org Subject: Re: 4.7 regression: ACPI: No IRQ available for PCI Interrupt Link [LNKD]. Try pci=noacpi or acpi=off To: Ondrej Zary References: <201609251512.05657.linux@rainbow-software.org> <201609291549.07784.linux@rainbow-software.org> <201609291848.33803.linux@rainbow-software.org> Cc: "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org, Bjorn Helgaas , wim@djo.tudelft.nl, ravikanth.nalla@hpe.com From: Sinan Kaya Message-ID: <701eeb2f-bfc2-d541-4f6f-34be200ea44a@codeaurora.org> Date: Thu, 29 Sep 2016 13:18:43 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: <201609291848.33803.linux@rainbow-software.org> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On 9/29/2016 12:48 PM, Ondrej Zary wrote: >> 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); > + } > } > The previous two patches were in the right direction. Can we also get the same output from 4.6 kernel with the attached patch for the same machine you sent these? Something about SCI still doesn't feel right. The IRQ assignment fails if the penalty is greater than PIRQ_PENALTY_ISA_ALWAYS. This will happen if BIOS tells us to use an IRQ and same IRQ is in use by the SCI. 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); } }