]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] i386: fix uses of user_mode() vs. user_mode_vm()
authorJan Beulich <jbeulich@novell.com>
Thu, 23 Mar 2006 10:59:46 +0000 (02:59 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Thu, 23 Mar 2006 15:38:05 +0000 (07:38 -0800)
>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>
arch/i386/kernel/crash.c
arch/i386/kernel/process.c
arch/i386/kernel/traps.c
include/asm-i386/mach-default/do_timer.h
include/asm-i386/mach-visws/do_timer.h
include/asm-i386/mach-voyager/do_timer.h

index d49dbe8dc96b345efa52c579e96782db3ecc3b3b..e3c5fca0aa8ad1ba9fd2797646d88c1b2146bdf7 100644 (file)
@@ -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;
        }
index 0480454ebffa6808d09735ecb3bf85232c1400ac..299e616740843f900d6bd1fdfce3d38a1373cb56 100644 (file)
@@ -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,
index d510de7e4f2a8a9d0e9998dbc548f264202adc33..a807a2da581d975006ead13bd120f748d021e9fa 100644 (file)
@@ -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);
        }
index 56211414fc9595bc1aeb7a854e1133b6e5238036..6312c3e798147d508c1c695c175559dd96dc8daf 100644 (file)
@@ -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
index 92d638fc8b11ab3354a9876d6125baecfbe4770c..95568e6ca91cf3cff150c743ff9f0f87a070a4d9 100644 (file)
@@ -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
index ae510e5d0d783c3d8604c402927a2696b04d088b..eaf518098981cc843e564d3ec1b650f17442256e 100644 (file)
@@ -5,7 +5,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
 
        voyager_timer_interrupt(regs);