Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db753bdf authored by Jan Beulich's avatar Jan Beulich Committed by Linus Torvalds
Browse files

[PATCH] i386: fix uses of user_mode() vs. user_mode_vm()



>commit 76381fee
>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: default avatarJan 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: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 101f12af
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -105,7 +105,7 @@ static int crash_nmi_callback(struct pt_regs *regs, int cpu)
		return 1;
	local_irq_disable();

	if (!user_mode(regs)) {
	if (!user_mode_vm(regs)) {
		crash_fixup_ss_esp(&fixed_regs, regs);
		regs = &fixed_regs;
	}
+1 −1
Original line number Diff line number Diff line
@@ -295,7 +295,7 @@ void show_regs(struct pt_regs * regs)
	printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id());
	print_symbol("EIP is at %s\n", regs->eip);

	if (user_mode(regs))
	if (user_mode_vm(regs))
		printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
	printk(" EFLAGS: %08lx    %s  (%s %.*s)\n",
	       regs->eflags, print_tainted(), system_utsname.release,
+2 −2
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ void show_registers(struct pt_regs *regs)

	esp = (unsigned long) (&regs->esp);
	savesegment(ss, ss);
	if (user_mode(regs)) {
	if (user_mode_vm(regs)) {
		in_kernel = 0;
		esp = regs->esp;
		ss = regs->xss & 0xffff;
@@ -644,7 +644,7 @@ void die_nmi (struct pt_regs *regs, const char *msg)
	/* If we are in kernel we are probably nested up pretty bad
	 * and might aswell get out now while we still can.
	*/
	if (!user_mode(regs)) {
	if (!user_mode_vm(regs)) {
		current->thread.trap_no = 2;
		crash_kexec(regs);
	}
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ static inline void do_timer_interrupt_hook(struct pt_regs *regs)
{
	do_timer(regs);
#ifndef CONFIG_SMP
	update_process_times(user_mode(regs));
	update_process_times(user_mode_vm(regs));
#endif
/*
 * In the SMP case we use the local APIC timer interrupt to do the
+1 −1
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ static inline void do_timer_interrupt_hook(struct pt_regs *regs)

	do_timer(regs);
#ifndef CONFIG_SMP
	update_process_times(user_mode(regs));
	update_process_times(user_mode_vm(regs));
#endif
/*
 * In the SMP case we use the local APIC timer interrupt to do the
Loading