From: "Serge E. Hallyn" <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
To: Oren Laadan <orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.org>
Cc: Linux Containers <containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org>
Subject: [PATCH 2/2] allow 32-bit restart of 64-bit and vice versa
Date: Wed, 27 Jan 2010 22:22:07 -0600 [thread overview]
Message-ID: <20100128042207.GA15779@us.ibm.com> (raw)
In-Reply-To: <20100128042137.GA15723-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Serge E. Hallyn <serue-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
---
arch/x86/kernel/checkpoint.c | 21 +++++----------------
1 files changed, 5 insertions(+), 16 deletions(-)
diff --git a/arch/x86/kernel/checkpoint.c b/arch/x86/kernel/checkpoint.c
index 0b8e2c3..fbe9521 100644
--- a/arch/x86/kernel/checkpoint.c
+++ b/arch/x86/kernel/checkpoint.c
@@ -272,22 +272,11 @@ int restore_thread(struct ckpt_ctx *ctx)
load_TLS(thread, cpu);
put_cpu();
-#if defined(CONFIG_X86_64)
- {
- int pre, post;
- /*
- * Eventually we'd like to support mixed-bit restart, but for
- * now don't pretend to.
- */
- pre = test_thread_flag(TIF_IA32);
- post = h->thread_info_flags & _TIF_IA32;
- if ((pre && !post) || (post && !pre)) {
- ret = -EINVAL;
- ckpt_err(ctx, ret, "%d-bit restarting %d-bit\n",
- pre ? 32 : 64, post ? 32 : 64);
- goto out;
- }
- }
+#if defined(CONFIG_X86_64) && defined(CONFIG_COMPAT)
+ if (h->thread_info_flags & _TIF_IA32)
+ set_thread_flag(TIF_IA32);
+ else
+ clear_thread_flag(TIF_IA32);
#endif
/* TODO: restore TIF flags as necessary (e.g. TIF_NOTSC) */
--
1.6.0.6
next prev parent reply other threads:[~2010-01-28 4:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-28 4:21 [RFC PATCH 1/2] mm: move destroy_mm into mmap.c and remove len check Serge E. Hallyn
[not found] ` <20100128042137.GA15723-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2010-01-28 4:22 ` Serge E. Hallyn [this message]
2010-02-04 17:38 ` Oren Laadan
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=20100128042207.GA15779@us.ibm.com \
--to=serue-r/jw6+rmf7hqt0dzr+alfa@public.gmane.org \
--cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
--cc=orenl-eQaUEPhvms7ENvBUuze7eA@public.gmane.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.