Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/ibm4xx No need to have same trap handlers i...
details: https://anonhg.NetBSD.org/src/rev/87254aac8cf4
branches: trunk
changeset: 349866:87254aac8cf4
user: rin <rin%NetBSD.org@localhost>
date: Mon Dec 26 20:28:00 2016 +0000
description:
No need to have same trap handlers in trap_subr.S.
No functional changes.
diffstat:
sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c | 20 ++++++++------------
sys/arch/powerpc/ibm4xx/trap_subr.S | 19 ++++++-------------
2 files changed, 14 insertions(+), 25 deletions(-)
diffs (103 lines):
diff -r 75daa01865b4 -r 87254aac8cf4 sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c
--- a/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c Mon Dec 26 20:16:29 2016 +0000
+++ b/sys/arch/powerpc/ibm4xx/ibm4xx_machdep.c Mon Dec 26 20:28:00 2016 +0000
@@ -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 @@
*/
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 @@
#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)
diff -r 75daa01865b4 -r 87254aac8cf4 sys/arch/powerpc/ibm4xx/trap_subr.S
--- a/sys/arch/powerpc/ibm4xx/trap_subr.S Mon Dec 26 20:16:29 2016 +0000
+++ b/sys/arch/powerpc/ibm4xx/trap_subr.S Mon Dec 26 20:28:00 2016 +0000
@@ -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 @@
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 @@
/*
* 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
Home |
Main Index |
Thread Index |
Old Index