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: 9059331 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 A0E679F1C1 for ; Tue, 10 May 2016 15:23:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6386320149 for ; Tue, 10 May 2016 15:23:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 74E8320148 for ; Tue, 10 May 2016 15:23:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753242AbcEJPXH (ORCPT ); Tue, 10 May 2016 11:23:07 -0400 Received: from mail-lf0-f41.google.com ([209.85.215.41]:33229 "EHLO mail-lf0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751922AbcEJPUL (ORCPT ); Tue, 10 May 2016 11:20:11 -0400 Received: by mail-lf0-f41.google.com with SMTP id y84so18913752lfc.0 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=MwZNSmX+tB+DkX5AWRS3EqsRHlbKeJ0B8JF4MKH/WIXNu6iQeRBc+66nZsOlYE6NYm cCyP0dmrYoKlrKrxRdNxZq0pKKLSFNmkDq6ZUFVUPYd18Ov4SHcwo4c3GYNCMwIOKnUi PAPfCQPgLoGpiGTvAi+veAJBFJs01JCOdab+1/x67kQrIq6MMExtSjcM3mRWEtdNx3qx LutKoyJvudqNRkVnetgN0eoEds2AIFsSkCEyvdzmEmc1gbxIyi4OfeiXitbLRZuyyDkl cPMRS6Qe+4YDCuYBhPD1KXZTEc8Maa8Cfx+2PZp8DfK7wvWI2n6c74FBBO3FfVW5yAyn oTCQ== X-Gm-Message-State: AOPr4FUx02QTVkjfeHzhwlhQ1IdJxjoB8yQSUMuuP3p4KsjwMuZ+v1KfLqgC02g4EnHxUw== 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 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 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> Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-8.9 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 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;