From patchwork Fri Oct 2 18:44:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 7318401 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D185CBEEA4 for ; Fri, 2 Oct 2015 18:47:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 04939207FD for ; Fri, 2 Oct 2015 18:47:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 23D7420610 for ; Fri, 2 Oct 2015 18:47:05 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zi5Jx-0008Eq-IC; Fri, 02 Oct 2015 18:44:41 +0000 Received: from mail-io0-x230.google.com ([2607:f8b0:4001:c06::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zi5Jo-00086y-8E for linux-arm-kernel@lists.infradead.org; Fri, 02 Oct 2015 18:44:33 +0000 Received: by ioiz6 with SMTP id z6so129527601ioi.2 for ; Fri, 02 Oct 2015 11:44:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ZzqY1aQkRJgnFFE07EKfIphUZ/DNP4yX69tzMTQgyDk=; b=x57YoTvV8hJrdrA1ObMuV2k0FPMFrNb9XrMOUrTLtxGjqmAxhySyBir5DJ7gBqsEFx vo17YdyWJ25splejsWgf+/4FsRfM8CD/Z+XKsNsOW0SB9ZY+dD8UR6v1m78QhiZuIa3a d4iZST0wK1eDGwuLzeKn3zUkPfhsnkUviAF7G5wr6N7/XUL2PUcbJd0gMS8vJ4gKvX4y eU8rZr9fbNdzIiI3GARkjZCzEcw0ysMISuRTrlE9+kPAt7FG2vgPATjDe0LvUJE8z0ms OiKKGwJa+QjCc8Z+0ijEQTm1EF2khczB5xT8Bl934ou2oooJxEb2J7polI+jRyOFgDPa ny9w== X-Received: by 10.107.170.32 with SMTP id t32mr18975447ioe.173.1443811451211; Fri, 02 Oct 2015 11:44:11 -0700 (PDT) Received: from dl.caveonetworks.com (64.2.3.194.ptr.us.xo.net. [64.2.3.194]) by smtp.gmail.com with ESMTPSA id f31sm5485608ioj.13.2015.10.02.11.44.07 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 02 Oct 2015 11:44:09 -0700 (PDT) Received: from dl.caveonetworks.com (localhost.localdomain [127.0.0.1]) by dl.caveonetworks.com (8.14.5/8.14.5) with ESMTP id t92Ii7hM018925; Fri, 2 Oct 2015 11:44:07 -0700 Received: (from ddaney@localhost) by dl.caveonetworks.com (8.14.5/8.14.5/Submit) id t92Ii6I0018924; Fri, 2 Oct 2015 11:44:06 -0700 From: David Daney To: linux-kernel@vger.kernel.org, Bjorn Helgaas , linux-pci@vger.kernel.org, Will Deacon , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, Marc Zyngier Subject: [PATCH v4 2/5] PCI: generic: Only fixup irqs for bus we are creating. Date: Fri, 2 Oct 2015 11:44:00 -0700 Message-Id: <1443811443-18878-3-git-send-email-ddaney.cavm@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1443811443-18878-1-git-send-email-ddaney.cavm@gmail.com> References: <1443811443-18878-1-git-send-email-ddaney.cavm@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151002_114432_369130_4A325D4D X-CRM114-Status: GOOD ( 12.00 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Daney MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: David Daney If we create multiple buses with pci-host-generic, or there are buses created by other drivers, we don't want to call pci_fixup_irqs() which operates on all devices, not just the devices on the bus being added. The consequence is that either the fixups are done more than once, or in some cases incorrect fixups could be applied. Call pci_bus_fixup_irqs() instead of pci_fixup_irqs(). Acked-by: Will Deacon Signed-off-by: David Daney --- No change from v2. drivers/pci/host/pci-host-generic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c index 265dd25..9e9f1c3 100644 --- a/drivers/pci/host/pci-host-generic.c +++ b/drivers/pci/host/pci-host-generic.c @@ -262,7 +262,7 @@ static int gen_pci_probe(struct platform_device *pdev) return -ENODEV; } - pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci); + pci_bus_fixup_irqs(bus, pci_common_swizzle, of_irq_parse_and_map_pci); if (!pci_has_flag(PCI_PROBE_ONLY)) { pci_bus_size_bridges(bus);