Merge commit 'v2.6.29-rc4' into perfcounters/core
[safe/jmp/linux-2.6] / arch / arm / kernel / process.c
index 8423617..d3ea6fa 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/unistd.h>
 #include <linux/slab.h>
 #include <linux/user.h>
-#include <linux/a.out.h>
 #include <linux/delay.h>
 #include <linux/reboot.h>
 #include <linux/interrupt.h>
 #include <linux/pm.h>
 #include <linux/tick.h>
 #include <linux/utsname.h>
+#include <linux/uaccess.h>
 
 #include <asm/leds.h>
 #include <asm/processor.h>
 #include <asm/system.h>
 #include <asm/thread_notify.h>
-#include <asm/uaccess.h>
 #include <asm/mach/time.h>
 
 static const char *processor_modes[] = {
@@ -44,11 +43,15 @@ static const char *processor_modes[] = {
   "UK8_32" , "UK9_32" , "UK10_32", "UND_32" , "UK12_32", "UK13_32", "UK14_32", "SYS_32"
 };
 
+static const char *isa_modes[] = {
+  "ARM" , "Thumb" , "Jazelle", "ThumbEE"
+};
+
 extern void setup_mm_for_reboot(char mode);
 
 static volatile int hlt_counter;
 
-#include <asm/arch/system.h>
+#include <mach/system.h>
 
 void disable_hlt(void)
 {
@@ -130,10 +133,8 @@ static void default_idle(void)
                cpu_relax();
        else {
                local_irq_disable();
-               if (!need_resched()) {
-                       timer_dyn_reprogram();
+               if (!need_resched())
                        arch_idle();
-               }
                local_irq_enable();
        }
 }
@@ -161,7 +162,7 @@ void cpu_idle(void)
                if (!idle)
                        idle = default_idle;
                leds_event(led_idle_start);
-               tick_nohz_stop_sched_tick();
+               tick_nohz_stop_sched_tick(1);
                while (!need_resched())
                        idle();
                leds_event(led_idle_end);
@@ -230,11 +231,11 @@ void __show_regs(struct pt_regs *regs)
        buf[3] = flags & PSR_V_BIT ? 'V' : 'v';
        buf[4] = '\0';
 
-       printk("Flags: %s  IRQs o%s  FIQs o%s  Mode %s%s  Segment %s\n",
+       printk("Flags: %s  IRQs o%s  FIQs o%s  Mode %s  ISA %s  Segment %s\n",
                buf, interrupts_enabled(regs) ? "n" : "ff",
                fast_interrupts_enabled(regs) ? "n" : "ff",
                processor_modes[processor_mode(regs)],
-               thumb_mode(regs) ? " (T)" : "",
+               isa_modes[isa_mode(regs)],
                get_fs() == get_ds() ? "kernel" : "user");
 #ifdef CONFIG_CPU_CP15
        {
@@ -261,40 +262,11 @@ void __show_regs(struct pt_regs *regs)
 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);
        __show_regs(regs);
        __backtrace();
 }
 
-void show_fpregs(struct user_fp *regs)
-{
-       int i;
-
-       for (i = 0; i < 8; i++) {
-               unsigned long *p;
-               char type;
-
-               p = (unsigned long *)(regs->fpregs + i);
-
-               switch (regs->ftype[i]) {
-                       case 1: type = 'f'; break;
-                       case 2: type = 'd'; break;
-                       case 3: type = 'e'; break;
-                       default: type = '?'; break;
-               }
-               if (regs->init_flag)
-                       type = '?';
-
-               printk("  f%d(%c): %08lx %08lx %08lx%c",
-                       i, type, p[0], p[1], p[2], i & 1 ? '\n' : ' ');
-       }
-                       
-
-       printk("FPSR: %08lx FPCR: %08lx\n",
-               (unsigned long)regs->fpsr,
-               (unsigned long)regs->fpcr);
-}
-
 /*
  * Free current thread data structures etc..
  */
@@ -364,35 +336,6 @@ int dump_fpu (struct pt_regs *regs, struct user_fp *fp)
 EXPORT_SYMBOL(dump_fpu);
 
 /*
- * fill in the user structure for a core dump..
- */
-void dump_thread(struct pt_regs * regs, struct user * dump)
-{
-       struct task_struct *tsk = current;
-
-       dump->magic = CMAGIC;
-       dump->start_code = tsk->mm->start_code;
-       dump->start_stack = regs->ARM_sp & ~(PAGE_SIZE - 1);
-
-       dump->u_tsize = (tsk->mm->end_code - tsk->mm->start_code) >> PAGE_SHIFT;
-       dump->u_dsize = (tsk->mm->brk - tsk->mm->start_data + PAGE_SIZE - 1) >> PAGE_SHIFT;
-       dump->u_ssize = 0;
-
-       dump->u_debugreg[0] = tsk->thread.debug.bp[0].address;
-       dump->u_debugreg[1] = tsk->thread.debug.bp[1].address;
-       dump->u_debugreg[2] = tsk->thread.debug.bp[0].insn.arm;
-       dump->u_debugreg[3] = tsk->thread.debug.bp[1].insn.arm;
-       dump->u_debugreg[4] = tsk->thread.debug.nsaved;
-
-       if (dump->start_stack < 0x04000000)
-               dump->u_ssize = (0x04000000 - dump->start_stack) >> PAGE_SHIFT;
-
-       dump->regs = *regs;
-       dump->u_fpvalid = dump_fpu (regs, &dump->u_fp);
-}
-EXPORT_SYMBOL(dump_thread);
-
-/*
  * Shuffle the argument into the correct register before calling the
  * thread function.  r1 is the thread argument, r2 is the pointer to
  * the thread function, and r3 points to the exit function.
@@ -442,7 +385,7 @@ unsigned long get_wchan(struct task_struct *p)
        do {
                if (fp < stack_start || fp > stack_end)
                        return 0;
-               lr = pc_pointer (((unsigned long *)fp)[-1]);
+               lr = ((unsigned long *)fp)[-1];
                if (!in_sched_functions(lr))
                        return lr;
                fp = *(unsigned long *) (fp - 12);