From patchwork Wed Dec 16 15:16:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 7863041 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 11AA1BEEE1 for ; Wed, 16 Dec 2015 15:28:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1798520382 for ; Wed, 16 Dec 2015 15:28:55 +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 3B5E12037F for ; Wed, 16 Dec 2015 15:28:54 +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 1a9Dyf-0001Kg-1K; Wed, 16 Dec 2015 15:26:53 +0000 Received: from mail-wm0-x22e.google.com ([2a00:1450:400c:c09::22e]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1a9DqX-0000le-Oe for linux-arm-kernel@lists.infradead.org; Wed, 16 Dec 2015 15:18:32 +0000 Received: by mail-wm0-x22e.google.com with SMTP id p187so5710547wmp.0 for ; Wed, 16 Dec 2015 07:18: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=U2RmdoQypTfgnkS55VkS7cgOv3Ks+hwhPLh9zo24lFI=; b=hI1RkSsI86sUfUcX36lIAFgTOBnRVsB7pqr+mR3kBC5YEpqkCw2nfrduNC+Zd8M1FI gD++njW1KROwX3V6aYI1B9bquI0Pbz+4oSrm/73g3RK5WsMHiKaYF5KpTE7sPzdL9V2I htgTKkrK70qZMVEaYCXF9Ut9UFY9/YmG+mwwySjOS/gOwCBjVo7rbUANaZdzA5Sv5vBb F0zlNT/O0REUxRSAIoNdHveIhVsvoUm9OXtkcBdue3QuferzkNJPznvsZgnYMjRyrA5m +lBUO+KbxFXMSdgxkrqRIzYt2hk27PbKbzJg1tY207fzOckM0kcXC63YifG6k6V//cyA k13A== 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=U2RmdoQypTfgnkS55VkS7cgOv3Ks+hwhPLh9zo24lFI=; b=M8aVk+C3Zeo6rDvWy9TRmYTTzDIR0ZRC3m7klwjT7GSzOG1gT6AsnNoR1FNHkSGOra yfdw9Epnc12eZYBfMAU1e1kVpqjkfaJjaeNfuZ4anG2a77fY+dBWU4mfZ7eqezAxxXSI OB9SBxhufdkdpALbB4oXT/gmKlzXh7LaX5r3AhYpm/RQ11AxDtasgNz6Y1NUwpkupTK4 8yNYdA2Vk79fcvPUtDI0hPIzu7HuQCSzBs5gzjlLGonQLJYUj1io3trb19t6eDAbZvYh kppieG5vL2xEz/4NtBnCnZYoIAaYvsovEDtgxFYY4QtGmX/3PPXbLxrftfFJzHjTPSZq 8aUA== X-Gm-Message-State: ALoCoQnTokMYZKxC+Zt6q+bAdl4JG46PGS7irM54EiRR3QG+5Hw2dawOQaGH1xMjYW+y2HKtT9yc9rmfHX4bPu6M2BAISeacfQ== X-Received: by 10.194.158.73 with SMTP id ws9mr18998212wjb.40.1450279088239; Wed, 16 Dec 2015 07:18:08 -0800 (PST) Received: from tn-HP-4.semihalf.local ([80.82.22.190]) by smtp.gmail.com with ESMTPSA id z17sm6438761wjq.1.2015.12.16.07.18.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 16 Dec 2015 07:18:07 -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 Subject: [PATCH V2 16/23] x86, ia64: Include acpi_pci_{add|remove}_bus to the default pcibios_{add|remove}_bus implementation. Date: Wed, 16 Dec 2015 16:16:26 +0100 Message-Id: <1450278993-12664-17-git-send-email-tn@semihalf.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1450278993-12664-1-git-send-email-tn@semihalf.com> References: <1450278993-12664-1-git-send-email-tn@semihalf.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151216_071830_312598_A78783C4 X-CRM114-Status: GOOD ( 13.66 ) 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: jchandra@broadcom.com, 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 , tglx@linutronix.de, 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=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, 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 Arches in subject are the only one who use pcibios_{add|remove}_bus hooks and implement it in the same way. Moreover ARM64 is going to do the same. So it seams 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 --- 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 fe96bc9..c1e8ed5 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c @@ -357,16 +357,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 eccd4d9..ed3236d 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 cad836f..2fbf840 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -2067,10 +2068,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,