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: 9141641 X-Patchwork-Delegate: bhelgaas@google.com 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 9931460777 for ; Mon, 30 May 2016 15:16:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8AE542819E for ; Mon, 30 May 2016 15:16:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F62328224; Mon, 30 May 2016 15:16:04 +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=unavailable 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 1718A2819E for ; Mon, 30 May 2016 15:16:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933505AbcE3PPT (ORCPT ); Mon, 30 May 2016 11:15:19 -0400 Received: from mail-lf0-f48.google.com ([209.85.215.48]:36696 "EHLO mail-lf0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933495AbcE3PPP (ORCPT ); Mon, 30 May 2016 11:15:15 -0400 Received: by mail-lf0-f48.google.com with SMTP id b73so51435501lfb.3 for ; Mon, 30 May 2016 08:15:15 -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=jDQRyyjUmiQPvYTwMWosHxbBGfkO0WFWaOHnYuBZQnQavogBo7REGsF0plKVgtSXXG 3vpeP3tRpvWrA7ltOInDA/Iyy0Obp4qisT+eVr6vsMfDys0IW4tcvLBNwu+XASlQMiXJ GyMP5GqFR4TIJUTGRQbaMw8RzHWx4f6ohIYUgl/TmUrFBRhbVbc66jQi5JyhBFO5Ar5D 6XxOfCl1E7Qc55ctvkrcQ4fC1udsthe87KTZRlqBtHU+I5GFF91auvMgorjQGraCv7TR YxPTS9rXbcdXMT1kAaBi3kb6uTzTtkLE4fasCo1MypU/A0P8aAStQ3YfdmPBRMbhEyRW pnkA== X-Gm-Message-State: ALyK8tK4xcVgf49MSBtZcXsrmc8Oi9HffuXjJBhwwuniNb4myuU80YSHBa3a+KSgHmEGlA== 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-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@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