From 1e89943aa317f47f1904c96d7b93acfe4f88945b Mon Sep 17 00:00:00 2001 From: Nathan Whitehorn Date: Sat, 11 Apr 2009 20:43:41 +0000 Subject: [PATCH] Fix recognition of kernel-mode traps that pass through the KDB trap handler but do not actually invoke KDB. This includes recoverable machine checks encountered in kernel mode. This patch causes machines with Grackle host-PCI bridges to be able to correctly enumerate them again. MFC after: 3 days --- sys/powerpc/aim/trap_subr.S | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/powerpc/aim/trap_subr.S b/sys/powerpc/aim/trap_subr.S index d782fae2ae70..0c62d83184ae 100644 --- a/sys/powerpc/aim/trap_subr.S +++ b/sys/powerpc/aim/trap_subr.S @@ -460,9 +460,7 @@ disitrap: stw %r30,(PC_DBSAVE +CPUSAVE_R30)(%r1) /* save r30 */ lwz %r31,(PC_DISISAVE+CPUSAVE_R31)(%r1) /* get r31 */ stw %r31,(PC_DBSAVE +CPUSAVE_R31)(%r1) /* save r31 */ - lis %r1,(tmpstk+TMPSTKSZ-16)@ha /* get new SP */ - addi %r1,%r1,(tmpstk+TMPSTKSZ-16)@l - b dbtrap + bla dbtrap #endif /* XXX need stack probe here */ @@ -631,7 +629,7 @@ dbtrap: mflr %r28 mfcr %r29 lwz %r31,(PC_DBSAVE+CPUSAVE_R31)(%r1) - mtlr %r31 + mtsprg3 %r31 /* SPRG3 was clobbered by FRAME_LEAVE */ mfsprg1 %r1 b realtrap dbleave: