Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166208
b: refs/heads/master
c: daf8f40
h: refs/heads/master
v: v3
  • Loading branch information
Josh Boyer authored and Benjamin Herrenschmidt committed Sep 24, 2009
1 parent 398acf8 commit 53c8425
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 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: f32af63ed1327451cb91e3816fa043b6c2c52db1
refs/heads/master: daf8f40391b2a1978ea2071c20959d91fade6b1a
16 changes: 13 additions & 3 deletions trunk/arch/powerpc/xmon/xmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,16 @@ int cpus_are_in_xmon(void)
}
#endif

static inline int unrecoverable_excp(struct pt_regs *regs)
{
#ifdef CONFIG_4xx
/* We have no MSR_RI bit on 4xx, so we simply return false */
return 0;
#else
return ((regs->msr & MSR_RI) == 0);
#endif
}

static int xmon_core(struct pt_regs *regs, int fromipi)
{
int cmd = 0;
Expand Down Expand Up @@ -388,7 +398,7 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
bp = NULL;
if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) == (MSR_IR|MSR_SF))
bp = at_breakpoint(regs->nip);
if (bp || (regs->msr & MSR_RI) == 0)
if (bp || unrecoverable_excp(regs))
fromipi = 0;

if (!fromipi) {
Expand All @@ -399,7 +409,7 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
cpu, BP_NUM(bp));
xmon_print_symbol(regs->nip, " ", ")\n");
}
if ((regs->msr & MSR_RI) == 0)
if (unrecoverable_excp(regs))
printf("WARNING: exception is not recoverable, "
"can't continue\n");
release_output_lock();
Expand Down Expand Up @@ -490,7 +500,7 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
printf("Stopped at breakpoint %x (", BP_NUM(bp));
xmon_print_symbol(regs->nip, " ", ")\n");
}
if ((regs->msr & MSR_RI) == 0)
if (unrecoverable_excp(regs))
printf("WARNING: exception is not recoverable, "
"can't continue\n");
remove_bpts();
Expand Down

0 comments on commit 53c8425

Please sign in to comment.