Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 39766
b: refs/heads/master
c: 00ae36d
h: refs/heads/master
v: v3
  • Loading branch information
Anton Blanchard authored and Paul Mackerras committed Oct 16, 2006
1 parent 857eee6 commit f9a5248
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 99f48610252b736908fa5bdea505a480368308d6
refs/heads/master: 00ae36de49cc718d4122e1c8aac96fd1a5a2553c
10 changes: 2 additions & 8 deletions trunk/arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit f9a5248

Please sign in to comment.