public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] Xen: hibernation is x86-only at the moment
Date: Tue, 29 Apr 2014 22:00:53 +0200	[thread overview]
Message-ID: <5165529.jneGVBC5b5@wuerfel> (raw)

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 <arnd@arndb.de>
---

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},

             reply	other threads:[~2014-04-29 20:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-29 20:00 Arnd Bergmann [this message]
2014-04-30  7:57 ` [PATCH] Xen: hibernation is x86-only at the moment Pavel Machek
2014-04-30  9:25 ` [Xen-devel] " David Vrabel
2014-05-06 13:35   ` Stefano Stabellini
2014-05-06 15:54     ` David Vrabel
2014-05-07 10:45       ` Stefano Stabellini
2014-05-07 10:57         ` David Vrabel
2014-05-07 11:47           ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5165529.jneGVBC5b5@wuerfel \
    --to=arnd@arndb.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox