From patchwork Tue Feb 16 13:53: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: 8326041 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1613E9F38B for ; Tue, 16 Feb 2016 13:56:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 23E7420279 for ; Tue, 16 Feb 2016 13:56:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 90A05202AE for ; Tue, 16 Feb 2016 13:56:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932602AbcBPNyO (ORCPT ); Tue, 16 Feb 2016 08:54:14 -0500 Received: from mail-wm0-f51.google.com ([74.125.82.51]:37767 "EHLO mail-wm0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932589AbcBPNyK (ORCPT ); Tue, 16 Feb 2016 08:54:10 -0500 Received: by mail-wm0-f51.google.com with SMTP id g62so153828225wme.0 for ; Tue, 16 Feb 2016 05:54:09 -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=yLQRwMdhaVsB7QJm1EkVtlaSEAtAKdptQzkkSZq+sFs=; b=WL2Vx+5GS7oMxFaK7Hz2XSuTdwqPHf4rAc7/kg35ZV8bFugoCZuTIhXit/9cMWhiYV /1tCb/oOhukAPtRVGppEDD5JkGFIyP6Sc1G+3406QYd2cgThY79+nbi4oRSNyHKZ4rvj 7A69FMlb0vTQ3WTARjoEVLu9/2f+RVQ6jMtObVnVgRso+FhK9uwNrkP0rJhC+KhtTWKP FgKm0NXgf2VUYlHQ5IV9W0SNAlBLyODB4M14Zq+X15m8Mu1cNuojUjm4Ff0w2anTiWRa uiXgiYhMle6+2314yIECjOkU80Hl9SfV97fzCRJuqr4XpwT3HxCc/6sWXQZ/nYcRACnq zwPg== 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=yLQRwMdhaVsB7QJm1EkVtlaSEAtAKdptQzkkSZq+sFs=; b=Za2GWsJ4orhvsrxNAd5GtSyWQYWa5rvPIPfyhcFHWeSAClKV9Hm2yDqXcE/9Ufodqw e3pjveXYoQ1LQppfk0sFLTx1WQEhg6CFc3zSQSZ+/j0JNI7JGDvD4RDtn/2JN8f54uXg U+MXyP9OZ/pbNBMefrRyiAWBKFjh95IRCZXntKTHxA/QINGz/CW5IcqpeMTBiUsBSYrM wRcM8S07Zqcs/n0UZDIoQv5kJyVyXRQmEklUGHEJeIWKMF1HSx+QOiTya+Q4EpkODzJh z5XNCzlrFcPbf4xGf3PBMpaKHie4K1peKbOSaUyUfirClR2KmMiCvdifsn6C0gPRSBVc tqvQ== X-Gm-Message-State: AG10YOR9dhuuK0oxLQePhDk1emofwYcVHqm27gAmun//VJVq44E/aV7fDMOvZABDn/tGjg== X-Received: by 10.28.144.10 with SMTP id s10mr18283282wmd.97.1455630847682; Tue, 16 Feb 2016 05:54:07 -0800 (PST) Received: from tn-HP-4.semihalf.local ([80.82.22.190]) by smtp.gmail.com with ESMTPSA id q129sm20833462wmd.14.2016.02.16.05.54.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Feb 2016 05:54:07 -0800 (PST) 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, 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, jcm@redhat.com, Tomasz Nowicki Subject: [PATCH V5 08/15] x86, ia64: Include acpi_pci_{add|remove}_bus to the default pcibios_{add|remove}_bus implementation. Date: Tue, 16 Feb 2016 14:53:38 +0100 Message-Id: <1455630825-27253-9-git-send-email-tn@semihalf.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1455630825-27253-1-git-send-email-tn@semihalf.com> References: <1455630825-27253-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=-6.8 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 88a4734..9859b12 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,