From patchwork Thu Feb 4 17:28:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 8226151 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@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 B3EDFBEEE5 for ; Thu, 4 Feb 2016 17:34:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C5F8920122 for ; Thu, 4 Feb 2016 17:34:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BB14F203A0 for ; Thu, 4 Feb 2016 17:34:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966249AbcBDReB (ORCPT ); Thu, 4 Feb 2016 12:34:01 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:36867 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966214AbcBDR30 (ORCPT ); Thu, 4 Feb 2016 12:29:26 -0500 Received: by mail-wm0-f51.google.com with SMTP id g62so15063503wme.0 for ; Thu, 04 Feb 2016 09:29:26 -0800 (PST) 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=V3JbGpbjvexbTZ72nIF1D9Q/Ro3VW+Wr79rExWh3vV8=; b=cmYayIdal8c6AWq630y5fXUiGsagAh4sZNpDDmlg3UrgPF6gCG2ikMhJMXJHzSDzi8 rfK/mge2gMMLDjmcqJmcIoDp23bHLgqRm9cm80dZp4Y95FT+9oWoCeurbCTTzUnOZPxh nqH/H3f+Hp5jTbFx3v66dqsZHrhEkb+mg/mVf7ivQloUAwOJ49fwRJYq4yQqBW3r2EKc xsEhnCcjQ5laaL9KmHR/Y8Kp2GZrQmUR7KmGhifOvldOOQz2/kCksUsMhyZsf2VWzJlU kiGAXe94H/HxEX1URMHv5vjNZJuiNGLAqfBizXH/3YCcyuLXF2+LVhNMOZk/VtN+Lfuk H+dw== 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=V3JbGpbjvexbTZ72nIF1D9Q/Ro3VW+Wr79rExWh3vV8=; b=V09i/EKlabH/c/OwazSSz9vp7njkfJAaYZiLX+xanwPfTuzCdXwaNuew8AyXyU0IW4 d7LZjbOD87V6WaZ2t+8uAh7sXVdcHTBnJe8avIPC4z54rYUbsr4BhOsKfwICLR9mq8+W e74OC3UVTNR3ZslI4Zm2WFKahAIU1gudigofqS8wqQWqnTmfBD8J3IMY0s3L4BjwA8Hu lG1iRAF2Dr+fDIel74/Dwgw+DtZ9s+BT8zwQbAWtL482wtwH9ooXGjczda6doPc5Zgcw FPsrUa0GjKzb+pjUnLTslNvOvxPizj/ie41ay/gP4Vm0Hq0z4sX+x7T+Ps8pLXm7teaB /x5g== X-Gm-Message-State: AG10YORFm4Na/tpd0vGumlawtBGTHntAJxWLvglfSzl9pJOrju5Xd8fuALJvd7TaEb8UEQ== X-Received: by 10.28.4.216 with SMTP id 207mr17574166wme.20.1454606965677; Thu, 04 Feb 2016 09:29:25 -0800 (PST) Received: from tn-HP-4.semihalf.local (cardhu.semihalf.com. [213.17.239.108]) by smtp.gmail.com with ESMTPSA id w8sm12238889wjx.21.2016.02.04.09.29.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 04 Feb 2016 09:29:25 -0800 (PST) From: Tomasz Nowicki To: bhelgaas@google.com, arnd@arndb.de, will.deacon@arm.com, catalin.marinas@arm.com, rjw@rjwysocki.net, hanjun.guo@linaro.org, Lorenzo.Pieralisi@arm.com, okaya@codeaurora.org, jiang.liu@linux.intel.com, Stefano.Stabellini@eu.citrix.com Cc: robert.richter@caviumnetworks.com, mw@semihalf.com, Liviu.Dudau@arm.com, ddaney@caviumnetworks.com, wangyijing@huawei.com, Suravee.Suthikulpanit@amd.com, msalter@redhat.com, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linaro-acpi@lists.linaro.org, jchandra@broadcom.com, jcm@redhat.com, Tomasz Nowicki Subject: [PATCH V4 14/23] x86, ia64: Include acpi_pci_{add|remove}_bus to the default pcibios_{add|remove}_bus implementation. Date: Thu, 4 Feb 2016 18:28:52 +0100 Message-Id: <1454606941-9523-15-git-send-email-tn@semihalf.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454606941-9523-1-git-send-email-tn@semihalf.com> References: <1454606941-9523-1-git-send-email-tn@semihalf.com> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 2879efc..5aa25f1 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c @@ -171,16 +171,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 81dd3a2..ef22a22 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -2060,10 +2061,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,