From patchwork Mon May 30 15:14:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 9141633 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id AE11D60801 for ; Mon, 30 May 2016 15:15:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 984D12819E for ; Mon, 30 May 2016 15:15:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8CEF528224; Mon, 30 May 2016 15:15:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A259B2819E for ; Mon, 30 May 2016 15:15:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933496AbcE3PPY (ORCPT ); Mon, 30 May 2016 11:15:24 -0400 Received: from mail-lf0-f42.google.com ([209.85.215.42]:35168 "EHLO mail-lf0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933484AbcE3PPW (ORCPT ); Mon, 30 May 2016 11:15:22 -0400 Received: by mail-lf0-f42.google.com with SMTP id w16so61780475lfd.2 for ; Mon, 30 May 2016 08:15:21 -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=rwYwm3DTeYq93GKrTvLX5CYHMYB7Wjo9kPvAM/Iy/j8=; b=YuKyvyu0catyT6k3d7J8ey8hNo4UyHWfVkkedCOrm0IhuGFdDARsQD1R6RJUdTjbst dfzUIonn38PtMH+ISovFxg6wch5Ck4E8NZ0PCEeXx+il8ugWj4XqxjbHGFsCPU+yaXxd JFdEsCrwSckcjtWlN0Z7qLH41ci2rQRz4TyXFfD0ViI3yW8BJoKRPr9fmrAAW1wy5Bq8 uMxrLdySLXirBjh2ncbPCZU9AcgXek4pHK4GyUtotvAawLE+NrVJbJWb91ufgAC++H2O s8BXoyiFFgSyejALMnu5NumS5FreToCK0QvdGyOhOjXCZ6AwgHL3I//gjSOXwt5kIPcS gICA== 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=rwYwm3DTeYq93GKrTvLX5CYHMYB7Wjo9kPvAM/Iy/j8=; b=WO09jYszTx+9aF1ARQfcUq8U3aqqwmnW2M/+lKyEVS0e+SffH8TUvXpRd9UzaBN5CP a31lL6DSV/KNBzBqJD/L2TY6V0/jg9hSOQ6q8zHvfphpDZZzfWKdJZaiE1ke0WkiSPpz aLJEzilFQeQ+AUWokG7Ks+SWKV6UDDSg6zIWreEnkKW70lq/LRQ9UiYaLyiws+OhPVrv PTtIaFwufs2zj/o7NdZMmceavFd8HGTkQCGNMHCe9eZHijQ+vg1563FSnNm8QotjFtEX WJNg5qs4E7JUhmd3RXd5J4fovQtogzXv6Eaa5gFiMOrOXMZbuV9v7NjE8gOG5Acm22JH 879A== X-Gm-Message-State: ALyK8tIxOJN9ct0dhv77OB6uuvnJoHx7Vq+kIyIfzbfwQ+J0CP5/kopDLXFqRu8LnD0+qw== X-Received: by 10.25.90.1 with SMTP id o1mr7668421lfb.193.1464621314306; Mon, 30 May 2016 08:15:14 -0700 (PDT) Received: from tn-HP-4.semihalf.local (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id n13sm1392264lfb.33.2016.05.30.08.15.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 May 2016 08:15:13 -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, jchandra@broadcom.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, andrea.gallo@linaro.org, dhdang@apm.com, jeremy.linton@arm.com, liudongdong3@huawei.com, cov@codeaurora.org, Tomasz Nowicki Subject: [PATCH V8 8/9] arm64, pci, acpi: Provide ACPI-specific prerequisites for PCI bus enumeration. Date: Mon, 30 May 2016 17:14:21 +0200 Message-Id: <1464621262-26770-9-git-send-email-tn@semihalf.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1464621262-26770-1-git-send-email-tn@semihalf.com> References: <1464621262-26770-1-git-send-email-tn@semihalf.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP ACPI requires to run acpi_pci_{add|remove}_bus while new PCI bus is created. This allows to do some ACPI-specific additional configuration, like PCI hotplug slot enumeration. In order to fulfill these requirements, we implement arch-specific pcibios_{add|remove}_bus calls and call acpi_pci_{add|remove}_bus from there. Signed-off-by: Tomasz Nowicki Reviewed-by: Lorenzo Pieralisi --- arch/arm64/kernel/pci.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c index 336deef..3663be1 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -17,6 +17,7 @@ #include #include #include +#include #include /* @@ -96,4 +97,15 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) /* TODO: Should be revisited when implementing PCI on ACPI */ return NULL; } + +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); +} + #endif