[PATCH] ppc64: create firmware_has_feature()
[linux-2.6-block.git] / arch / ppc64 / kernel / process.c
index cdfecbeb331f58d586edd4b85aa58212f859d872..9bad983333b1258c31dc826a91bab0699ffdaeff 100644 (file)
@@ -36,6 +36,7 @@
 #include <linux/kallsyms.h>
 #include <linux/interrupt.h>
 #include <linux/utsname.h>
+#include <linux/kprobes.h>
 
 #include <asm/pgtable.h>
 #include <asm/uaccess.h>
@@ -49,6 +50,7 @@
 #include <asm/machdep.h>
 #include <asm/iSeries/HvCallHpt.h>
 #include <asm/cputable.h>
+#include <asm/firmware.h>
 #include <asm/sections.h>
 #include <asm/tlbflush.h>
 #include <asm/time.h>
@@ -58,14 +60,6 @@ struct task_struct *last_task_used_math = NULL;
 struct task_struct *last_task_used_altivec = NULL;
 #endif
 
-struct mm_struct ioremap_mm = {
-       .pgd            = ioremap_dir,
-       .mm_users       = ATOMIC_INIT(2),
-       .mm_count       = ATOMIC_INIT(1),
-       .cpu_vm_mask    = CPU_MASK_ALL,
-       .page_table_lock = SPIN_LOCK_UNLOCKED,
-};
-
 /*
  * Make sure the floating-point register state in the
  * the thread_struct is up to date for task tsk.
@@ -213,7 +207,7 @@ struct task_struct *__switch_to(struct task_struct *prev,
 /* purr is nothing but processor time base                          */
 
 #if defined(CONFIG_PPC_PSERIES)
-       if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
+       if (firmware_has_feature(FW_FEATURE_SPLPAR)) {
                struct cpu_usage *cu = &__get_cpu_var(cpu_usage_array);
                long unsigned start_tb, current_tb;
                start_tb = old_thread->start_tb;
@@ -315,6 +309,8 @@ void show_regs(struct pt_regs * regs)
 
 void exit_thread(void)
 {
+       kprobe_flush_task(current);
+
 #ifndef CONFIG_SMP
        if (last_task_used_math == current)
                last_task_used_math = NULL;
@@ -329,6 +325,7 @@ void flush_thread(void)
 {
        struct thread_info *t = current_thread_info();
 
+       kprobe_flush_task(current);
        if (t->flags & _TIF_ABI_PENDING)
                t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT);