diff options
Diffstat (limited to 'arch/powerpc/kernel/process.c')
| -rw-r--r-- | arch/powerpc/kernel/process.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 7b2f6452ba72..f3d4dd580dd6 100644 --- a/arch/powerpc/kernel/process.c +++ b/arch/powerpc/kernel/process.c | |||
| @@ -341,13 +341,6 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
| 341 | 341 | ||
| 342 | static int instructions_to_print = 16; | 342 | static int instructions_to_print = 16; |
| 343 | 343 | ||
| 344 | #ifdef CONFIG_PPC64 | ||
| 345 | #define BAD_PC(pc) ((REGION_ID(pc) != KERNEL_REGION_ID) && \ | ||
| 346 | (REGION_ID(pc) != VMALLOC_REGION_ID)) | ||
| 347 | #else | ||
| 348 | #define BAD_PC(pc) ((pc) < KERNELBASE) | ||
| 349 | #endif | ||
| 350 | |||
| 351 | static void show_instructions(struct pt_regs *regs) | 344 | static void show_instructions(struct pt_regs *regs) |
| 352 | { | 345 | { |
| 353 | int i; | 346 | int i; |
| @@ -366,7 +359,8 @@ static void show_instructions(struct pt_regs *regs) | |||
| 366 | * bad address because the pc *should* only be a | 359 | * bad address because the pc *should* only be a |
| 367 | * kernel address. | 360 | * kernel address. |
| 368 | */ | 361 | */ |
| 369 | if (BAD_PC(pc) || __get_user(instr, (unsigned int __user *)pc)) { | 362 | if (!__kernel_text_address(pc) || |
| 363 | __get_user(instr, (unsigned int __user *)pc)) { | ||
| 370 | printk("XXXXXXXX "); | 364 | printk("XXXXXXXX "); |
| 371 | } else { | 365 | } else { |
| 372 | if (regs->nip == pc) | 366 | if (regs->nip == pc) |
