aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/traps.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2006-03-23 05:59:46 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-23 10:38:05 -0500
commitdb753bdfc24c31228996799d508ce3bf7cbe3b99 (patch)
tree620f4154d7c297857fa9d9512ccaeb113342c078 /arch/i386/kernel/traps.c
parent101f12af16fb12f8da8100899a13ee1b1b576a0a (diff)
[PATCH] i386: fix uses of user_mode() vs. user_mode_vm()
>commit 76381fee7e8feb4c22be636aa5d4765dbe4fbf9e >Author: Vincent Hanquez <vincent.hanquez@cl.cam.ac.uk> >Date: Thu Jun 23 00:08:46 2005 -0700 > > [PATCH] xen: x86_64: use more usermode macro > > Make use of the user_mode macro where it's possible. This is useful for Xen > because it will need only to redefine only the macro to a hypervisor call. I am of the opinion that the above changeset is incomplete, i.e. it missed converting some previous uses of user_mode to user_mode_vm. While most of them could be considered just cosmetical, at least the one in die_nmi doesn't appear to be. Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: Vincent Hanquez <vincent.hanquez@cl.cam.ac.uk> Cc: Zachary Amsden <zach@vmware.com> Cc: James Bottomley <James.Bottomley@steeleye.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/i386/kernel/traps.c')
-rw-r--r--arch/i386/kernel/traps.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/i386/kernel/traps.c b/arch/i386/kernel/traps.c
index d510de7e4f2a..a807a2da581d 100644
--- a/arch/i386/kernel/traps.c
+++ b/arch/i386/kernel/traps.c
@@ -254,7 +254,7 @@ void show_registers(struct pt_regs *regs)
254 254
255 esp = (unsigned long) (&regs->esp); 255 esp = (unsigned long) (&regs->esp);
256 savesegment(ss, ss); 256 savesegment(ss, ss);
257 if (user_mode(regs)) { 257 if (user_mode_vm(regs)) {
258 in_kernel = 0; 258 in_kernel = 0;
259 esp = regs->esp; 259 esp = regs->esp;
260 ss = regs->xss & 0xffff; 260 ss = regs->xss & 0xffff;
@@ -644,7 +644,7 @@ void die_nmi (struct pt_regs *regs, const char *msg)
644 /* If we are in kernel we are probably nested up pretty bad 644 /* If we are in kernel we are probably nested up pretty bad
645 * and might aswell get out now while we still can. 645 * and might aswell get out now while we still can.
646 */ 646 */
647 if (!user_mode(regs)) { 647 if (!user_mode_vm(regs)) {
648 current->thread.trap_no = 2; 648 current->thread.trap_no = 2;
649 crash_kexec(regs); 649 crash_kexec(regs);
650 } 650 }