All of lore.kernel.org
 help / color / mirror / Atom feed
From: swarren@wwwdotorg.org (Stephen Warren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 1/2] kexec: return error of machine_kexec() fails
Date: Wed, 12 Jun 2013 14:01:20 -0600	[thread overview]
Message-ID: <1371067281-655-1-git-send-email-swarren@wwwdotorg.org> (raw)

From: Stephen Warren <swarren@nvidia.com>

Prior to commit 3ab8352 "kexec jump", if machine_kexec() returned,
sys_reboot() would return -EINVAL. This patch restores this behaviour
for the non-KEXEC_JUMP case, where machine_kexec() is not expected to
return.

This situation can occur on ARM, where kexec requires disabling all but
one CPU using CPU hotplug. However, if hotplug isn't supported by the
particular HW the kernel is running on, then kexec cannot succeed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
v2: New patch.

Eric, Patch 2/2 doesn't really depend on this in particular, except to
avoid returning 0 back to user-space on failure, and thus generating:

kexec failed: Success

Hence, I think you can just apply this to your tree, and Russell will
apply 2/2 to his. If not, perhaps you can ack it so Russell can take
both?
---
 kernel/kexec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/kexec.c b/kernel/kexec.c
index 59f7b55..bde1190 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -1702,6 +1702,8 @@ int kernel_kexec(void)
 		pm_restore_console();
 		unlock_system_sleep();
 	}
+#else
+	error = -EINVAL;
 #endif
 
  Unlock:
-- 
1.8.1.5

             reply	other threads:[~2013-06-12 20:01 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12 20:01 Stephen Warren [this message]
2013-06-12 20:01 ` [PATCH V2 2/2] ARM: decouple CPU offlining from reboot/shutdown Stephen Warren
2013-06-13  1:58   ` zhangfei gao
2013-06-13 15:05     ` Stephen Warren
2013-06-13  7:45   ` Will Deacon
2013-06-13 14:59     ` Stephen Warren
2013-06-13 17:11       ` Russell King - ARM Linux
2013-06-14  4:53         ` zhangfei gao
2013-06-13 17:10     ` Russell King - ARM Linux
2013-06-17 18:58   ` Stephen Warren
2013-06-17 19:41     ` Russell King - ARM Linux
2013-06-21 22:41 ` [PATCH V2 1/2] kexec: return error of machine_kexec() fails Stephen Warren

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=1371067281-655-1-git-send-email-swarren@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.