]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sh/kernel/process.c
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[linux-2.6-omap-h63xx.git] / arch / sh / kernel / process.c
index 15ae322dbd741a594529835c2c543987125d37f9..6d7f2b07e4917ee8ff7e25b7ca01bad63ff0f311 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/tick.h>
 #include <linux/reboot.h>
 #include <linux/fs.h>
+#include <linux/preempt.h>
 #include <asm/uaccess.h>
 #include <asm/mmu_context.h>
 #include <asm/pgalloc.h>
@@ -120,7 +121,7 @@ void machine_power_off(void)
 void show_regs(struct pt_regs * regs)
 {
        printk("\n");
-       printk("Pid : %d, Comm: %20s\n", current->pid, current->comm);
+       printk("Pid : %d, Comm: %20s\n", task_pid_nr(current), current->comm);
        print_symbol("PC is at %s\n", instruction_pointer(regs));
        printk("PC  : %08lx SP  : %08lx SR  : %08lx ",
               regs->pc, regs->regs[15], regs->sr);
@@ -349,12 +350,11 @@ struct task_struct *__switch_to(struct task_struct *prev,
        unlazy_fpu(prev, task_pt_regs(prev));
 #endif
 
-#ifdef CONFIG_PREEMPT
+#if defined(CONFIG_GUSA) && defined(CONFIG_PREEMPT)
        {
-               unsigned long flags;
                struct pt_regs *regs;
 
-               local_irq_save(flags);
+               preempt_disable();
                regs = task_pt_regs(prev);
                if (user_mode(regs) && regs->regs[15] >= 0xc0000000) {
                        int offset = (int)regs->regs[15];
@@ -365,7 +365,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
                                /* Go to rewind point */
                                regs->pc = regs->regs[0] + offset;
                }
-               local_irq_restore(flags);
+               preempt_enable_no_resched();
        }
 #endif