From patchwork Tue Apr 29 20:00:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 4088941 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 78D4A9F169 for ; Tue, 29 Apr 2014 20:03:59 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6A4A220176 for ; Tue, 29 Apr 2014 20:03:58 +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 697C320172 for ; Tue, 29 Apr 2014 20:03:57 +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 1WfEDc-0002Bu-64; Tue, 29 Apr 2014 20:01:32 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WfEDZ-00024X-Bx for linux-arm-kernel@lists.infradead.org; Tue, 29 Apr 2014 20:01:30 +0000 Received: from wuerfel.localnet (HSI-KBW-134-3-133-35.hsi14.kabel-badenwuerttemberg.de [134.3.133.35]) by mrelayeu.kundenserver.de (node=mreue006) with ESMTP (Nemesis) id 0LwBgI-1WwXYu1QVS-01834E; Tue, 29 Apr 2014 22:00:54 +0200 From: Arnd Bergmann To: xen-devel@lists.xenproject.org Subject: [PATCH] Xen: hibernation is x86-only at the moment Date: Tue, 29 Apr 2014 22:00:53 +0200 Message-ID: <5165529.jneGVBC5b5@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.11.0-18-generic; KDE/4.11.5; x86_64; ; ) MIME-Version: 1.0 X-Provags-ID: V02:K0:v4xpqS74P+FdaCuq63kxzSqZnogwsJRUzgVpKErEQiH tXKs9FNQDpmYXbTXJEoTq/3vx2bx+HkMEI0f94lOMUeHMX8FY8 KqCfpfGqTcbicVJEvIYhFWgjbF5axZxEOWJyIdhsS9mSv+RrUp ewq/Ujl3y7xVp+QME/ACmn/6VZWEN0xYsPaNLkaPh60zmeRB9b hqTJGBcNbBJYNSDSj4eyj2GRztrazRd/Yza54uR/QfAzs5vAjT I8fzyQ0k8Re3nHZmP6S5BxvhjS2N8OCAExkvQQTniSyJ1VMG0c gK3LwOITCaoTR/umWjG1HQgrGJLvPvubuiemKhhPqlHD37Oj+y QVcdpYPzNUyoCNKwovMs= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140429_130129_763493_DE240399 X-CRM114-Status: GOOD ( 11.11 ) X-Spam-Score: 0.0 (/) Cc: Ian Campbell , Konrad Rzeszutek Wilk , Stefano Stabellini , Russ Dill , Sebastian Capella , Pavel Machek , Russell King , linux-arm-kernel@lists.infradead.org, David Vrabel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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=-2.5 required=5.0 tests=BAYES_00,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 In commit 603fb42a66499ab "ARM: 8011/1: ARM hibernation / suspend-to-disk", currently in linux-next, the ARM architecture gains support for hibernation (suspend-to-disk). Xen supports this in principle, but only has an architecture specific hypercall defined on x86, which leads to a build error when both hibernation and Xen support are enabled: drivers/xen/manage.c:105:2: error: implicit declaration of function 'HYPERVISOR_suspend' [-Werror=implicit-function-declaration] si->cancelled = HYPERVISOR_suspend(si->arg); It is probably a good idea to define this hypercall on ARM as well and provide an implementation in the host, but until that is done, this patch helps disable the broken code in the Xen guest by making it depend on CONFIG_X86. Signed-off-by: Arnd Bergmann diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c index 32f9236..beba1be 100644 --- a/drivers/xen/manage.c +++ b/drivers/xen/manage.c @@ -60,7 +60,7 @@ void xen_resume_notifier_unregister(struct notifier_block *nb) } EXPORT_SYMBOL_GPL(xen_resume_notifier_unregister); -#ifdef CONFIG_HIBERNATE_CALLBACKS +#if defined(CONFIG_HIBERNATE_CALLBACKS) && defined(CONFIG_X86) static void xen_hvm_post_suspend(int cancelled) { xen_arch_hvm_post_suspend(cancelled); @@ -242,7 +242,7 @@ static void shutdown_handler(struct xenbus_watch *watch, { "poweroff", do_poweroff }, { "halt", do_poweroff }, { "reboot", do_reboot }, -#ifdef CONFIG_HIBERNATE_CALLBACKS +#if defined(CONFIG_HIBERNATE_CALLBACKS) && defined(CONFIG_X86) { "suspend", do_suspend }, #endif {NULL, NULL},