b/arch/powerpc/kernel/exceptions-64e.S
@@ -538,12 +538,15 @@ kernel_dbg_exc:
mfspr r13,SPRN_SPRG_DBG_SCRATCH
rfdi
+1:
/* Normal debug exception */
+#ifndef CONFIG_KGDB
/* XXX We only handle coming from userspace for now since we can't
* quite save properly an interrupted kernel state yet
*/
-1: andi. r14,r11,MSR_PR; /* check for userspace again */
+ andi. r14,r11,MSR_PR; /* check for userspace again */
beq kernel_dbg_exc; /* if from kernel mode */
+#endif
/* Now we mash up things to make it look like we are coming on a
* normal exception