Module Name:    src
Committed By:   rin
Date:           Mon Dec 26 20:28:00 UTC 2016

Modified Files:
        src/sys/arch/powerpc/ibm4xx: ibm4xx_machdep.c trap_subr.S

Log Message:
No need to have same trap handlers in trap_subr.S.
No functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/powerpc/ibm4xx/trap_subr.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c
diff -u src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.23 src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.24
--- src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c:1.23	Mon Dec 26 20:16:29 2016
+++ src/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c	Mon Dec 26 20:28:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: ibm4xx_machdep.c,v 1.23 2016/12/26 20:16:29 rin Exp $	*/
+/*	$NetBSD: ibm4xx_machdep.c,v 1.24 2016/12/26 20:28:00 rin Exp $	*/
 /*	Original: ibm40x_machdep.c,v 1.3 2005/01/17 17:19:36 shige Exp $ */
 
 /*
@@ -68,7 +68,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.23 2016/12/26 20:16:29 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.24 2016/12/26 20:28:00 rin Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
@@ -123,14 +123,11 @@ void *startsym, *endsym;
  */
 extern const uint32_t defaulttrap[], defaultsize;
 extern const uint32_t sctrap[], scsize;
-extern const uint32_t alitrap[], alisize;
-extern const uint32_t dsitrap[], dsisize;
-extern const uint32_t isitrap[], isisize;
-extern const uint32_t mchktrap[], mchksize;
+extern const uint32_t accesstrap[], accesssize;
+extern const uint32_t criticaltrap[], criticalsize;
 extern const uint32_t tlbimiss4xx[], tlbim4size;
 extern const uint32_t tlbdmiss4xx[], tlbdm4size;
 extern const uint32_t pitfitwdog[], pitfitwdogsize;
-extern const uint32_t debugtrap[], debugsize;
 extern const uint32_t errata51handler[], errata51size;
 #if defined(DDB)
 extern const uint32_t ddblow[], ddbsize;
@@ -139,14 +136,13 @@ extern const uint32_t ipkdblow[], ipkdbs
 #endif
 static const struct exc_info trap_table[] = {
 	{ EXC_SC,	sctrap,		(uintptr_t)&scsize },
-	{ EXC_ALI,	alitrap,	(uintptr_t)&alisize },
-	{ EXC_DSI,	dsitrap,	(uintptr_t)&dsisize },
-	{ EXC_ISI,	isitrap,	(uintptr_t)&isisize },
-	{ EXC_MCHK,	mchktrap,	(uintptr_t)&mchksize },
+	{ EXC_ALI,	accesstrap,	(uintptr_t)&accesssize },
+	{ EXC_DSI,	accesstrap,	(uintptr_t)&accesssize },
+	{ EXC_MCHK,	criticaltrap,	(uintptr_t)&criticalsize },
 	{ EXC_ITMISS,	tlbimiss4xx,	(uintptr_t)&tlbim4size },
 	{ EXC_DTMISS,	tlbdmiss4xx,	(uintptr_t)&tlbdm4size },
 	{ EXC_PIT,	pitfitwdog,	(uintptr_t)&pitfitwdogsize },
-	{ EXC_DEBUG,	debugtrap,	(uintptr_t)&debugsize },
+	{ EXC_DEBUG,	criticaltrap,	(uintptr_t)&criticalsize },
 	{ (EXC_DTMISS|EXC_ALI),
 			errata51handler, (uintptr_t)&errata51size },
 #if defined(DDB)

Index: src/sys/arch/powerpc/ibm4xx/trap_subr.S
diff -u src/sys/arch/powerpc/ibm4xx/trap_subr.S:1.24 src/sys/arch/powerpc/ibm4xx/trap_subr.S:1.25
--- src/sys/arch/powerpc/ibm4xx/trap_subr.S:1.24	Sat Feb  9 11:22:51 2013
+++ src/sys/arch/powerpc/ibm4xx/trap_subr.S	Mon Dec 26 20:28:00 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap_subr.S,v 1.24 2013/02/09 11:22:51 kiyohara Exp $	*/
+/*	$NetBSD: trap_subr.S,v 1.25 2016/12/26 20:28:00 rin Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -105,7 +105,7 @@
 	mfcr	%r29;			/* save CR */		\
 	mfdear	%r30;						\
 	mfesr	%r31;						\
-	stmw	%r30,(savearea+CPUSAVE_DEAR)(%r1);		\
+	stmw	%r30,(savearea+CPUSAVE_DEAR)(%r1); /* save esr/dear */ \
 	mfsrr0	%r30;						\
 	mfsrr1	%r31; /* Test whether we already had PR set */	\
 	stmw	%r30,(savearea+CPUSAVE_SRR0)(%r1); /* save srr0/srr1 */	\
@@ -172,18 +172,10 @@ _C_LABEL(name ## size) = .-_C_LABEL(name
 	addi	%r1,%r1,USPACE-CALLFRAMELEN; /* stack is top of user struct */ \
 1:
 
-/*
- * This code gets copied to all the trap vectors
- * (except ISI/DSI, ALI, the interrupts, and possibly the debugging
- * traps when using IPKDB).
- */
 	.text
 	STANDARD_EXC_HANDLER(default)
-	ACCESS_EXC_HANDLER(ali)
-	ACCESS_EXC_HANDLER(dsi)
-	ACCESS_EXC_HANDLER(isi)
-	STANDARD_EXC_HANDLER(debug)
-	CRITICAL_EXC_HANDLER(mchk)
+	ACCESS_EXC_HANDLER(access)
+	CRITICAL_EXC_HANDLER(critical)
 
 /*
  * This one for the external interrupt handler.
@@ -258,7 +250,8 @@ _C_LABEL(ipkdbsize) = .-_C_LABEL(ipkdblo
 /*
  * FRAME_SETUP assumes:
  *	SPRG1		SP (r1)
- *	savearea	r28-r31,DEAR,ESR,SRR0,SRR1 (DEAR & ESR only for DSI traps)
+ *	savearea	r28-r31,DEAR,ESR,SRR0,SRR1
+ *			(DEAR & ESR only for access traps)
  *	%r28		LR
  *	%r29		CR
  *	%r1		kernel stack

Reply via email to