From patchwork Mon Oct 24 04:31:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sinan Kaya X-Patchwork-Id: 9391359 X-Patchwork-Delegate: rjw@sisk.pl 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 A1F8C607D0 for ; Mon, 24 Oct 2016 04:32:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 987CF28C25 for ; Mon, 24 Oct 2016 04:32:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CA5328C33; Mon, 24 Oct 2016 04:32:16 +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 autolearn=ham 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 2B26428C25 for ; Mon, 24 Oct 2016 04:32:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755842AbcJXEbw (ORCPT ); Mon, 24 Oct 2016 00:31:52 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:50265 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751137AbcJXEbs (ORCPT ); Mon, 24 Oct 2016 00:31:48 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 6A50E61BD1; Mon, 24 Oct 2016 04:31:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1477283507; bh=FPVw/1mi3IVUboj4/gq433UYOdTfq5wx0Ckq0NfrMLo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jmEbpOngo+m43iy0XleXjiBse7i4UITj9XmW6GPARZgrYPq4/35KL9kVxWRpRq1mN z8VcPOWoPZRw7IJjHpr76vzl9bhujFEpugffhgkJubEDuUZw0UTd++OjzCQCBEjBHD UldyLRSnsnwnaUWfjkA6eN6dIYHwDHw7Mvxt3bB0= Received: from drakthul.qualcomm.com (global_nat1_iad_fw.qualcomm.com [129.46.232.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: okaya@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 7662D61B2E; Mon, 24 Oct 2016 04:31:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1477283506; bh=FPVw/1mi3IVUboj4/gq433UYOdTfq5wx0Ckq0NfrMLo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nGX6be46hrwq2leqsfJjz39ZAkm/XSE1O58dNsm03UnYsL1J+I3wFdYTPoXHlFGsQ lIC6NKFeHi2rmmHdcvUVsoCxUZ/RFvFyNf8bUn+Ux+OvO56sOrFaMlwmI5TGR7a/f5 z581EzsL687Si1reToFG/KyoH0ujDwFjFjnO1kTo= DMARC-Filter: OpenDMARC Filter v1.3.1 smtp.codeaurora.org 7662D61B2E 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 From: Sinan Kaya To: linux-acpi@vger.kernel.org, rjw@rjwysocki.net, bhelgaas@google.com, ravikanth.nalla@hpe.com, linux@rainbow-software.org, timur@codeaurora.org, cov@codeaurora.org, jcm@redhat.com, alex.williamson@redhat.com Cc: net147@gmail.com, linux-pci@vger.kernel.org, agross@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, wim@djo.tudelft.nl, Sinan Kaya , Len Brown , linux-kernel@vger.kernel.org Subject: [PATCH V5 3/3] ACPI: pci_link: Include PIRQ_PENALTY_PCI_USING for ISA IRQs Date: Mon, 24 Oct 2016 00:31:32 -0400 Message-Id: <1477283492-26657-4-git-send-email-okaya@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1477283492-26657-1-git-send-email-okaya@codeaurora.org> References: <1477283492-26657-1-git-send-email-okaya@codeaurora.org> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Commit 103544d86976 ("ACPI,PCI,IRQ: reduce resource requirements") replaced the addition of PIRQ_PENALTY_PCI_USING in acpi_pci_link_allocate() with an addition in acpi_irq_pci_sharing_penalty(), but f7eca374f000 ("ACPI,PCI,IRQ: separate ISA penalty calculation") removed the use of acpi_irq_pci_sharing_penalty() for ISA IRQs. Therefore, PIRQ_PENALTY_PCI_USING is missing from ISA IRQs used by interrupt links. Include that penalty by adding it in the acpi_pci_link_allocate() path. Fixes: f7eca374f000 ("ACPI,PCI,IRQ: separate ISA penalty calculation") Signed-off-by: Sinan Kaya Acked-by: Bjorn Helgaas Tested-by: Jonathan Liu --- 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 74bf96e..bc3d914 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c @@ -608,6 +608,10 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link) acpi_device_bid(link->device)); return -ENODEV; } else { + if (link->irq.active < 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);