From patchwork Tue May 10 15:19:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Nowicki X-Patchwork-Id: 9059431 Return-Path: X-Original-To: patchwork-linux-arm@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 7997C9F1C1 for ; Tue, 10 May 2016 15:23:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9A57B200E5 for ; Tue, 10 May 2016 15:23:39 +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 C01F720148 for ; Tue, 10 May 2016 15:23:38 +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 1b09U0-0006LC-8E; Tue, 10 May 2016 15:22:00 +0000 Received: from mail-lf0-x229.google.com ([2a00:1450:4010:c07::229]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b09SU-0004Ou-2z for linux-arm-kernel@lists.infradead.org; Tue, 10 May 2016 15:20:34 +0000 Received: by mail-lf0-x229.google.com with SMTP id j8so18700387lfd.2 for ; Tue, 10 May 2016 08:20:10 -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=/OvOPweIp2iFooEygnMdrYU1erZDDA/sm+O/TBL6HG8=; b=gg40f63GrTbW7EHz0frQKFoiX9nPF2cS3N7fkGk7V/tFYMwoTTdJMDDJCbST9b4aFS Lch7frn7er/IkjDDcNlWo7T3panofTRL/WaEkSA3c3wX9P6fvzCVKFfgGK/mkAhq/MeZ Wp4PwtU+6uz+5M8Mhj9zmVJ+nrSTmE/B0c9E9rbBb6WFBWAg/hizc3asXk/eIuGo4Hvf 1xarLOeqJJ0Bzqxmsu4ECxOOCyZFGLVPPcEsEcmxM9RH3p54c+Jfb43b4H6ybbuqwDYe EwgW14QJDRnufDAsi2hDDVBpJSmO8jCCTw8l0Ym4fXoMD/oLwli3gTzppv8vdzrz2w9+ kYFQ== 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=/OvOPweIp2iFooEygnMdrYU1erZDDA/sm+O/TBL6HG8=; b=G9O9MU0JlZGQcCfh7rwYc0iOI8pKGxGAV6pB5RxWgRusaWIxTfC446kXnHSmoCjd+V ITv7Rb1jybDLYXNoSmQJbhlOfo1QYYrM4fk8efipeBbDmRV4l+wS39GkiWILqlRbuDdb gANtXbcwz+HwKEDVse+6qSvglL+qLgd+7oHqd6Tj4sMZ8d1zwdruCxF96knXNxlKqBcL SGffJu3U4FnZiOffPDFB97upfKAnCvIN82xsvu9dJc3p4Qdj3cOv3dF/fmBZvE5gtrgc Z5NBabpuvgwnxMyo4s9MiSDx0bSwHFGv6NYAZJzPcPNxDYIWwMLMtVLHcY2E0lMC9hRf 1YtA== X-Gm-Message-State: AOPr4FVeRqyVxll3wZPbdMFgRc7GLjEik7Dh+XqWhx1GUuNKZvRqXXrBf2LyyhMYWDq6wQ== X-Received: by 10.112.162.232 with SMTP id yd8mr16960646lbb.97.1462893609386; Tue, 10 May 2016 08:20:09 -0700 (PDT) Received: from tn-HP-4.semihalf.local (cardhu.semihalf.com. [213.17.239.108]) by smtp.gmail.com with ESMTPSA id s194sm468002lfs.40.2016.05.10.08.20.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 May 2016 08:20:08 -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 Subject: [PATCH V7 07/11] pci, acpi: Handle ACPI companion assignment. Date: Tue, 10 May 2016 17:19:57 +0200 Message-Id: <1462893601-8937-8-git-send-email-tn@semihalf.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1462893601-8937-1-git-send-email-tn@semihalf.com> References: <1462893601-8937-1-git-send-email-tn@semihalf.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160510_082026_601266_2735ADFB X-CRM114-Status: GOOD ( 12.73 ) X-Spam-Score: -1.9 (-) 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: jcm@redhat.com, linaro-acpi@lists.linaro.org, linux-pci@vger.kernel.org, dhdang@apm.com, Liviu.Dudau@arm.com, ddaney@caviumnetworks.com, jeremy.linton@arm.com, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, robert.richter@caviumnetworks.com, cov@codeaurora.org, Suravee.Suthikulpanit@amd.com, msalter@redhat.com, wangyijing@huawei.com, Tomasz Nowicki , mw@semihalf.com, andrea.gallo@linaro.org, linux-arm-kernel@lists.infradead.org, liudongdong3@huawei.com 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=-6.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,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 This patch provides a way to set the ACPI companion in PCI code. We define acpi_pci_set_companion() to set the ACPI companion pointer and call it from PCI core code. The function is stub for now. Signed-off-by: Jayachandran C Signed-off-by: Tomasz Nowicki --- drivers/pci/probe.c | 2 ++ include/linux/pci-acpi.h | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 8004f67..fb0b752 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -2141,6 +2142,7 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus, bridge->dev.parent = parent; bridge->dev.release = pci_release_host_bridge_dev; dev_set_name(&bridge->dev, "pci%04x:%02x", pci_domain_nr(b), bus); + acpi_pci_set_companion(bridge); error = pcibios_root_bridge_prepare(bridge); if (error) { kfree(bridge); diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 09f9f02..1baa515 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h @@ -111,6 +111,10 @@ static inline void acpi_pci_add_bus(struct pci_bus *bus) { } static inline void acpi_pci_remove_bus(struct pci_bus *bus) { } #endif /* CONFIG_ACPI */ +static inline void acpi_pci_set_companion(struct pci_host_bridge *bridge) +{ +} + static inline int acpi_pci_bus_domain_nr(struct pci_bus *bus) { return 0;