From: ebiederm@xmission.com (Eric W. Biederman)
To: Simon Horman <horms@verge.net.au>
Cc: Kexec Mailing List <kexec@lists.infradead.org>
Subject: [PATCH 2/3] kexec: Figure out our native architecture before load
Date: Thu, 11 Mar 2010 00:21:33 -0800 [thread overview]
Message-ID: <m1bpevb75e.fsf@fess.ebiederm.org> (raw)
In-Reply-To: <m1k4tjb7d1.fsf@fess.ebiederm.org> (Eric W. Biederman's message of "Thu\, 11 Mar 2010 00\:16\:58 -0800")
This moves the computing of our native archtecture earlier so
that load can use it, as arch/i386/crashdump-x86.c has been
trying to.
Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
---
kexec/kexec.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/kexec/kexec.c b/kexec/kexec.c
index 43d0189..16a0ec9 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -695,17 +695,19 @@ static int my_load(const char *type, int fileind, int argc, char **argv,
}
}
}
+ /* Figure out our native architecture before load */
+ native_arch = physical_arch();
+ if (native_arch < 0) {
+ return -1;
+ }
+ info.kexec_flags |= native_arch;
+
if (file_type[i].load(argc, argv, kernel_buf,
kernel_size, &info) < 0) {
fprintf(stderr, "Cannot load %s\n", kernel);
return -1;
}
/* If we are not in native mode setup an appropriate trampoline */
- native_arch = physical_arch();
- if (native_arch < 0) {
- return -1;
- }
- info.kexec_flags |= native_arch;
if (arch_compat_trampoline(&info) < 0) {
return -1;
}
--
1.6.6.1
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2010-03-11 8:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-11 8:16 [PATCH 0/3] Getting biarch support Eric W. Biederman
2010-03-11 8:20 ` [PATCH 1/3] Refix concat_cmdline Eric W. Biederman
2010-03-11 8:20 ` [PATCH 0/3] Getting biarch support Simon Horman
2010-03-11 8:21 ` Eric W. Biederman [this message]
2010-03-11 8:22 ` [PATCH 3/3] x86: Fix biarch crashdump setup Eric W. Biederman
2010-03-11 8:22 ` [PATCH 0/3] Getting biarch support Bernhard Walle
2010-03-11 8:35 ` Eric W. Biederman
2010-03-11 8:48 ` Simon Horman
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=m1bpevb75e.fsf@fess.ebiederm.org \
--to=ebiederm@xmission.com \
--cc=horms@verge.net.au \
--cc=kexec@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