From patchwork Fri Apr 15 17:06:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 8852671 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 086A6BF440 for ; Fri, 15 Apr 2016 17:10:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D1067203DA for ; Fri, 15 Apr 2016 17:10:49 +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 1A1BD203B7 for ; Fri, 15 Apr 2016 17:10:48 +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 1ar7Dt-0003jo-KY; Fri, 15 Apr 2016 17:08:01 +0000 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ar7DT-0003UT-Nj for linux-arm-kernel@lists.infradead.org; Fri, 15 Apr 2016 17:07:38 +0000 Received: by mail-wm0-x230.google.com with SMTP id u206so41252204wme.1 for ; Fri, 15 Apr 2016 10:07:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=rnV8hxqdI8Fxo96435k5qabypxfo/LJWc8Le0PlZ6BM=; b=QyiUYvrHG1b+U3z/2LJd2M525aJ/NMfrqrpwBb1oH/HkCKYzrUdlEYGm3qDTQ0xFw/ br/aT5WM9YqHon2MH60VE7rlQelIyg5PpiaL64o1rjGMYgDPobHJTr+e1jzD6lPpVVPh kDUccu+IJ6jevsa8JI6qrMsJ2zrz07PurI3AdAekRYL4mqNgjJjF8x+BWCUQegvzASJv zaotmEtCRRx7UOV340ktPZheAEoFXXRUDucWEIfsMAd1b7gDhiNd8hF2YBxC0TrDxVBX W/8jNe0l4BJj9ZrFT29d6oCOOAE6YoDHFMSlIZZGys9OniG+se8x1QJl3fnOVLs7ML9U WG6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rnV8hxqdI8Fxo96435k5qabypxfo/LJWc8Le0PlZ6BM=; b=K3e9p1epPnf8BNitYbogPWwVYYPZloMOThABjQM2pJBZ3HFmakv+BfbVDr9fPhuo+0 XcIMIgSab/M/Q+hsuFnOQ6vTGtKX6oZQACa2ZEwLq5RaL4sae4kikv7ho9NrRo7lvryU 24wy+T+a6E6aJ8Tup34PDHdxEwxGSX/a9L+ciMOTekSE0E5RiBhcU+wREVv4K2/UtDkf 78+YqjOzULGKaZ2/6a/eTFNXYFeV3ibjPa8kc4C281B7XN0ubDhQw6dgN01yEyyFgOvx nuYDoABNnv5MgmiEDd8iR1p1XzeMiIEbMai8ecou882J0VvPT3qX7CG1XBMqYXKaU+L/ l9vA== X-Gm-Message-State: AOPr4FV6pqGf5LFHSoSFgTiBAMs7mKzqjII3EyYeJgLDJZnyYW2F+/pbcY2PPVUwS6UL8A== X-Received: by 10.28.54.70 with SMTP id d67mr5931266wma.94.1460740036473; Fri, 15 Apr 2016 10:07:16 -0700 (PDT) Received: from tn-HP-4.semihalf.local (cardhu.semihalf.com. [213.17.239.108]) by smtp.gmail.com with ESMTPSA id gr4sm14282723wjd.23.2016.04.15.10.07.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Apr 2016 10:07:15 -0700 (PDT) From: Tomasz Nowicki To: helgaas@kernel.org, arnd@arndb.de, will.deacon@arm.com, catalin.marinas@arm.com, rafael@kernel.org, hanjun.guo@linaro.org, Lorenzo.Pieralisi@arm.com, okaya@codeaurora.org, jiang.liu@linux.intel.com, jchandra@broadcom.com Subject: [PATCH V6 03/13] x86, ia64: Include acpi_pci_{add|remove}_bus to the default pcibios_{add|remove}_bus implementation. Date: Fri, 15 Apr 2016 19:06:38 +0200 Message-Id: <1460740008-19489-4-git-send-email-tn@semihalf.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460740008-19489-1-git-send-email-tn@semihalf.com> References: <1460740008-19489-1-git-send-email-tn@semihalf.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160415_100736_066438_2E67CD92 X-CRM114-Status: GOOD ( 13.06 ) X-Spam-Score: -2.6 (--) 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: jcm@redhat.com, linaro-acpi@lists.linaro.org, linux-pci@vger.kernel.org, Liviu.Dudau@arm.com, ddaney@caviumnetworks.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, robert.richter@caviumnetworks.com, Suravee.Suthikulpanit@amd.com, msalter@redhat.com, wangyijing@huawei.com, Tomasz Nowicki , mw@semihalf.com, linux-arm-kernel@lists.infradead.org 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=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable 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 x86 and ia64 are the only arches that implement pcibios_{add|remove}_bus hooks and implement them in the same way. Moreover ARM64 is going to do the same. So it seems that acpi_pci_{add|remove}_bus is generic enough to be default option for pcibios_{add|remove}_bus hooks. Also, it is always safe to run acpi_pci_{add|remove}_bus as they have empty stubs for !ACPI case and return if ACPI has been switched off in run time. After all we can remove x86 and ia64 pcibios_{add|remove}_bus implementation. Signed-off-by: Tomasz Nowicki Reviewed-by: Lorenzo Pieralisi Tested-by: Duc Dang Tested-by: Dongdong Liu Tested-by: Hanjun Guo Tested-by: Graeme Gregory Tested-by: Sinan Kaya --- arch/ia64/pci/pci.c | 10 ---------- arch/x86/pci/common.c | 10 ---------- drivers/pci/probe.c | 3 +++ 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 978d6af..be4c9ef 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -358,16 +358,6 @@ void pcibios_fixup_bus(struct pci_bus *b) platform_pci_fixup_bus(b); } -void pcibios_add_bus(struct pci_bus *bus) -{ - acpi_pci_add_bus(bus); -} - -void pcibios_remove_bus(struct pci_bus *bus) -{ - acpi_pci_remove_bus(bus); -} - void pcibios_set_master (struct pci_dev *dev) { /* No special bus mastering setup handling */ diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 381a43c..7763a84 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -170,16 +170,6 @@ void pcibios_fixup_bus(struct pci_bus *b) pcibios_fixup_device_resources(dev); } -void pcibios_add_bus(struct pci_bus *bus) -{ - acpi_pci_add_bus(bus); -} - -void pcibios_remove_bus(struct pci_bus *bus) -{ - acpi_pci_remove_bus(bus); -} - /* * Only use DMI information to set this if nothing was passed * on the kernel command line (which was parsed earlier). diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 8087297..ef569e8 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -2101,10 +2102,12 @@ int __weak pcibios_root_bridge_prepare(struct pci_host_bridge *bridge) void __weak pcibios_add_bus(struct pci_bus *bus) { + acpi_pci_add_bus(bus); } void __weak pcibios_remove_bus(struct pci_bus *bus) { + acpi_pci_remove_bus(bus); } struct pci_bus *pci_create_root_bus(struct device *parent, int bus,