Merge branches 'release', 'idle', 'redhat-bugzilla-436589', 'sbs' and 'video' into...
[sfrench/cifs-2.6.git] / arch / powerpc / kernel / process.c
index b9d88374f14f07abe21e51367110e6c82129ba99..59311ec0d422d3eca2f94b358808bde287765fbc 100644 (file)
@@ -353,6 +353,12 @@ struct task_struct *__switch_to(struct task_struct *prev,
        account_process_vtime(current);
        calculate_steal_time();
 
+       /*
+        * We can't take a PMU exception inside _switch() since there is a
+        * window where the kernel stack SLB and the kernel stack are out
+        * of sync. Hard disable here.
+        */
+       hard_irq_disable();
        last = _switch(old_thread, new_thread);
 
        local_irq_restore(flags);
@@ -462,7 +468,7 @@ void show_regs(struct pt_regs * regs)
               current, task_pid_nr(current), current->comm, task_thread_info(current));
 
 #ifdef CONFIG_SMP
-       printk(" CPU: %d", smp_processor_id());
+       printk(" CPU: %d", raw_smp_processor_id());
 #endif /* CONFIG_SMP */
 
        for (i = 0;  i < 32;  i++) {