No need to have same trap handlers in trap_subr.S.

No functional changes.
This commit is contained in:
rin 2016-12-26 20:28:00 +00:00
parent 4a63f69046
commit 0000e45fe1
2 changed files with 14 additions and 25 deletions

View File

@ -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[], ipkdbsize;
#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)

View File

@ -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 ## trap)
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(ipkdblow)
/*
* 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