From patchwork Sat Mar 21 07:03:26 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hanjun Guo X-Patchwork-Id: 6063581 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 80962BF90F for ; Sat, 21 Mar 2015 07:08:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7D4A020328 for ; Sat, 21 Mar 2015 07:08:01 +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 440C52015A for ; Sat, 21 Mar 2015 07:08:00 +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 1YZDTG-0004A5-Of; Sat, 21 Mar 2015 07:05:22 +0000 Received: from szxga03-in.huawei.com ([119.145.14.66]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YZDTA-00030q-V4 for linux-arm-kernel@lists.infradead.org; Sat, 21 Mar 2015 07:05:18 +0000 Received: from 172.24.2.119 (EHLO SZXEML429-HUB.china.huawei.com) ([172.24.2.119]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BDL02211; Sat, 21 Mar 2015 15:03:37 +0800 (CST) Received: from [127.0.0.1] (10.177.17.188) by SZXEML429-HUB.china.huawei.com (10.82.67.184) with Microsoft SMTP Server id 14.3.158.1; Sat, 21 Mar 2015 15:03:28 +0800 Message-ID: <550D17BE.70009@huawei.com> Date: Sat, 21 Mar 2015 15:03:26 +0800 From: Hanjun Guo User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1 MIME-Version: 1.0 To: Hanjun Guo , Will Deacon , Parth Dixit , "'Stefano Stabellini'" Subject: Re: [PATCH v10 00/21] Introduce ACPI for ARM64 based on ACPI 5.1 References: <1426077587-1561-1-git-send-email-hanjun.guo@linaro.org> <20150318190509.GM10863@arm.com> <550A4BFD.4070804@huawei.com> <20150320185400.GK1474@arm.com> <550CE2CE.4080508@linaro.org> In-Reply-To: <550CE2CE.4080508@linaro.org> X-Originating-IP: [10.177.17.188] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.550D17CB.011A, ss=1, re=0.001, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: b2915fc4f01efe10ebdbbe3c4fc67dd2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150321_000517_837421_AA6DBC50 X-CRM114-Status: GOOD ( 17.82 ) X-Spam-Score: -2.3 (--) Cc: Mark Rutland , Ashwin Chaugule , Lorenzo Pieralisi , Robert Richter , "graeme.gregory@linaro.org" , Arnd Bergmann , "linux-acpi@vger.kernel.org" , Marc Zyngier , Catalin Marinas , Timur Tabi , "linaro-acpi@lists.linaro.org" , "Rafael J. Wysocki" , "linux-kernel@vger.kernel.org" , "grant.likely@linaro.org" , Mark Brown , "linux-arm-kernel@lists.infradead.org" , "suravee.suthikulpanit@amd.com" , Sudeep Holla , Olof Johansson , "jcm@redhat.com" 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 On 2015/3/21 11:17, Hanjun Guo wrote: > +CC Parth Dixit, Stefano Stabellini. > > On 2015?03?21? 02:54, Will Deacon wrote: >> On Thu, Mar 19, 2015 at 04:09:33AM +0000, Hanjun Guo wrote: >>> On 2015/3/19 3:05, Will Deacon wrote: >>>> If you can get that in place, I'm not opposed to putting this into >>>> linux-next ahead of the firmware summit in San Jose next week. Note that >>>> this is not a commitment for 4.1, since I'm keen to see the outcomes of >>>> next week before setting anything in stone. >>> >>> OK, I will stick to this mailing list and respond as soon as I can. >> >> This doesn't even build for me: >> >> >> $ make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- allmodconfig >> $ make ARCH=arm64 CROSS_COMPILE=aarch64-none-linux-gnu- Image >> >> [...] >> >> In file included from drivers/xen/acpi.c:33:0: > > Sorry, I didn't build ACPI with XEN enabled on ARM64. > >> include/xen/acpi.h: In function ‘xen_acpi_sleep_register’: >> include/xen/acpi.h:102:3: error: ‘acpi_suspend_lowlevel’ undeclared (first use in this function) >> acpi_suspend_lowlevel = xen_acpi_suspend_lowlevel; > > acpi_suspend_lowlevel is defined only for X86 and IA64 for now. > >> ^ >> include/xen/acpi.h:102:3: note: each undeclared identifier is reported only once for each function it appears in >> drivers/xen/acpi.c: In function ‘xen_acpi_notify_hypervisor_state’: >> drivers/xen/acpi.c:61:2: error: implicit declaration of function ‘HYPERVISOR_dom0_op’ [-Werror=implicit-function-declaration] >> HYPERVISOR_dom0_op(&op); > > And this is only for x86: > ./arch/x86/include/asm/xen/hypercall.h:HYPERVISOR_dom0_op(struct xen_platform_op *platform_op) > >> ^ >> cc1: some warnings being treated as errors >> make[2]: *** [drivers/xen/acpi.o] Error 1 >> make[2]: *** Waiting for unfinished jobs.... >> make[1]: *** [drivers/xen] Error 2 >> make[1]: *** Waiting for unfinished jobs.... >> make: *** [drivers] Error 2 >> >> >> Am I missing some other patches? > > No, you miss nothing. Parth Dixit is still working on XEN ACPI for > ARM64, before it's in full function, how about introduce a Kconfig > CONFIG_XEN_ACPI and let it depends on x86? when XEN ACPI for ARM64 > comes, we can enable ARM64 for CONFIG_XEN_ACPI and fix the problems > above. > > Stefano, Parth, what do you think? I prepared a patch for further reference: From 268dcdafa34a690e2f99c0784ca33a6d2352ecf5 Mon Sep 17 00:00:00 2001 From: Hanjun Guo Date: Sat, 21 Mar 2015 14:43:54 +0800 Subject: [PATCH] XEN / ACPI: Make XEN ACPI depend on X86 When ACPI is enabled on ARM64, XEN ACPI will also compiled into the kernel, but XEN ACPI is x86 dependent, so introduce CONFIG_XEN_ACPI to make it depend on x86 before XEN ACPI is functional on ARM64. Signed-off-by: Hanjun Guo --- drivers/xen/Kconfig | 4 ++++ drivers/xen/Makefile | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/xen/Kconfig b/drivers/xen/Kconfig index b812462..a31cd29 100644 --- a/drivers/xen/Kconfig +++ b/drivers/xen/Kconfig @@ -253,4 +253,8 @@ config XEN_EFI def_bool y depends on X86_64 && EFI +config XEN_ACPI + def_bool y + depends on X86 && ACPI + endmenu diff --git a/drivers/xen/Makefile b/drivers/xen/Makefile index 2ccd359..f4622ab 100644 --- a/drivers/xen/Makefile +++ b/drivers/xen/Makefile @@ -13,7 +13,7 @@ CFLAGS_efi.o += -fshort-wchar dom0-$(CONFIG_PCI) += pci.o dom0-$(CONFIG_USB_SUPPORT) += dbgp.o -dom0-$(CONFIG_ACPI) += acpi.o $(xen-pad-y) +dom0-$(CONFIG_XEN_ACPI) += acpi.o $(xen-pad-y) xen-pad-$(CONFIG_X86) += xen-acpi-pad.o dom0-$(CONFIG_X86) += pcpu.o obj-$(CONFIG_XEN_DOM0) += $(dom0-y)