From patchwork Mon May 18 13:08:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 6429281 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 D0B7EC0432 for ; Mon, 18 May 2015 13:21:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EE02620414 for ; Mon, 18 May 2015 13:21:53 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 23401202E9 for ; Mon, 18 May 2015 13:21:53 +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 1YuKw8-0003wy-4h; Mon, 18 May 2015 13:18:28 +0000 Received: from mail-pd0-f182.google.com ([209.85.192.182]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YuKmv-000363-J3 for linux-arm-kernel@lists.infradead.org; Mon, 18 May 2015 13:08:58 +0000 Received: by pdbnk13 with SMTP id nk13so53624851pdb.1 for ; Mon, 18 May 2015 06:08:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=EbPnXdOqOU1dK6vAxVztA/hHN3i0hOpXo6qTi1Q4l9Q=; b=acYmH1ceK8sYJ/WIWluSycw/edTGPVvb3MMNrJztnhcFHQfHWgqk6+9l172WXjrZr2 /zk+p/3EEywS8o+NrvUpL8PrSQKl6uF3mn4s8NPUJAWHEVhJrCTmqsJdUWtgdCbBTGEA 76A2KrY0NnYzjv2J9xrfK0NIDa+RGixlsg/Ta7xMqzhkIK5CgZDW+k/vv+gZMdFGOis9 eVvk4mQYugB3+O+UDpi2R0Y4hVQ92duW8PT0InnxKC4hiaYePvJGugaSqclblyBEoONW rSKmLb3bFlfoBGgu+70f8YwtDASxZ+hyMjysHrJIclLP2FwEJMakO+U9haefy/zoBgM1 EDaA== X-Gm-Message-State: ALoCoQnDzIVIzH8zBt2nV0Jof/n1EZD5aaSgMhvGGi996Wab6c/IFOjYEp+0gT+8/lsseckrG2nO X-Received: by 10.68.68.203 with SMTP id y11mr38219590pbt.34.1431954514825; Mon, 18 May 2015 06:08:34 -0700 (PDT) Received: from [10.10.1.10] ([180.150.148.224]) by mx.google.com with ESMTPSA id j9sm10084063pdm.53.2015.05.18.06.08.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 May 2015 06:08:34 -0700 (PDT) Message-ID: <5559E44B.2010702@linaro.org> Date: Mon, 18 May 2015 21:08:27 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Jiang Liu , "Rafael J . Wysocki" , Bjorn Helgaas , Marc Zyngier , Yijing Wang , Len Brown Subject: Re: [Patch v3 5/7] PCI/ACPI: Consolidate common PCI host bridge code into ACPI core References: <1431593803-5213-1-git-send-email-jiang.liu@linux.intel.com> <1431593803-5213-6-git-send-email-jiang.liu@linux.intel.com> In-Reply-To: <1431593803-5213-6-git-send-email-jiang.liu@linux.intel.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150518_060857_719151_847BD823 X-CRM114-Status: GOOD ( 12.96 ) X-Spam-Score: -1.8 (-) Cc: linux-pci@vger.kernel.org, "x86 @ kernel . org" , LKML , linux-acpi@vger.kernel.org, Lv Zheng , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Hi Jiang, On 2015?05?14? 16:56, Jiang Liu wrote: > Introduce common interface acpi_pci_root_create() and related data > structures to create PCI root bus for ACPI PCI host bridges. It will > be used to kill duplicated arch specific code for IA64 and x86. It may > also help ARM64 in future. As I commented in previous version, this patch will introduce compile error on ACPI enabled ARM64 kernel because struct pci_controller is not defined for ARM64, so how about adding the following patch before this patch, or squash to this one, does it make sense? From 11d0e98154e681e75936698208398cb4dcd73632 Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Mon, 18 May 2015 19:41:56 +0800 Subject: [PATCH] ARM64 / PCI: introduce struct pci_controller for ACPI ARM64 ACPI based PCI host bridge init needs a arch dependent struct pci_controller to accommodate common PCI host bridge code which is introduced later, or it will lead to compile errors on ARM64. Signed-off-by: Hanjun Guo CC: Liviu Dudau CC: Will Deacon CC: Catalin Marinas CC: Lorenzo Pieralisi CC: Arnd Bergmann Tested-by: Suravee Suthikulpanit --- arch/arm64/include/asm/pci.h | 10 ++++++++++ 1 file changed, 10 insertions(+) Thanks Hanjun diff --git a/arch/arm64/include/asm/pci.h b/arch/arm64/include/asm/pci.h index b008a72..7088495 100644 --- a/arch/arm64/include/asm/pci.h +++ b/arch/arm64/include/asm/pci.h @@ -10,6 +10,16 @@ #include #include +struct acpi_device; + +struct pci_controller { +#ifdef CONFIG_ACPI + struct acpi_device *companion; /* ACPI companion device */ +#endif + int segment; /* PCI domain */ + int node; /* NUMA node */ +}; + #define PCIBIOS_MIN_IO 0x1000 #define PCIBIOS_MIN_MEM 0