Browse Source

Blackfin arch: fix bux - only reset the PC when necessary, otherwise gdb gets confused

Signed-off-by: Robin Getz <robin.getz@analog.com>
Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Robin Getz 17 years ago
parent
commit
4a589e1ef6
1 changed files with 3 additions and 2 deletions
  1. 3 2
      arch/blackfin/kernel/traps.c

+ 3 - 2
arch/blackfin/kernel/traps.c

@@ -158,7 +158,7 @@ static void decode_address(char *buf, unsigned long address)
 	}
 
 	/* we were unable to find this address anywhere */
-	sprintf(buf, "[<0x%p>]", (void *)address);
+	sprintf(buf, "<0x%p> /* unknown address */", (void *)address);
 
 done:
 	write_unlock_irqrestore(&tasklist_lock, flags);
@@ -467,7 +467,8 @@ asmlinkage void trap_c(struct pt_regs *fp)
 		/* Ensure that bad return addresses don't end up in an infinite
 		 * loop, due to speculative loads/reads
 		 */
-		fp->pc = SAFE_USER_INSTRUCTION;
+		if (trapnr == VEC_CPLB_I_M)
+			fp->pc = SAFE_USER_INSTRUCTION;
 	}
 	info.si_signo = sig;
 	info.si_errno = 0;