Merge ../linux-2.6-watchdog-mm
[linux-drm-fsl-dcu.git] / arch / powerpc / kernel / process.c
index 7b2f6452ba7252caa11c377553392446d44c02e0..f3d4dd580dd69fe20a04dd4762866ad0f82d51ea 100644 (file)
@@ -341,13 +341,6 @@ struct task_struct *__switch_to(struct task_struct *prev,
 
 static int instructions_to_print = 16;
 
-#ifdef CONFIG_PPC64
-#define BAD_PC(pc)     ((REGION_ID(pc) != KERNEL_REGION_ID) && \
-                        (REGION_ID(pc) != VMALLOC_REGION_ID))
-#else
-#define BAD_PC(pc)     ((pc) < KERNELBASE)
-#endif
-
 static void show_instructions(struct pt_regs *regs)
 {
        int i;
@@ -366,7 +359,8 @@ static void show_instructions(struct pt_regs *regs)
                 * bad address because the pc *should* only be a
                 * kernel address.
                 */
-               if (BAD_PC(pc) || __get_user(instr, (unsigned int __user *)pc)) {
+               if (!__kernel_text_address(pc) ||
+                    __get_user(instr, (unsigned int __user *)pc)) {
                        printk("XXXXXXXX ");
                } else {
                        if (regs->nip == pc)