Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc Now that the generic fixup code exists, the...
details: https://anonhg.NetBSD.org/src/rev/a1d287bbef35
branches: trunk
changeset: 766106:a1d287bbef35
user: matt <matt%NetBSD.org@localhost>
date: Wed Jun 15 17:47:45 2011 +0000
description:
Now that the generic fixup code exists, there's no to patch the interrupts
directly since the stub fixup will do that automatically. Just need to add
stubs for the interrupt vectors and they get fixed automagically.
diffstat:
sys/arch/powerpc/booke/genassym.cf | 8 +---
sys/arch/powerpc/booke/trap_subr.S | 70 +++-------------------------------
sys/arch/powerpc/powerpc/db_trace.c | 13 ++----
sys/arch/powerpc/powerpc/intr_stubs.c | 47 +++++++++++++++++++++++-
4 files changed, 58 insertions(+), 80 deletions(-)
diffs (250 lines):
diff -r 2c749c6a3531 -r a1d287bbef35 sys/arch/powerpc/booke/genassym.cf
--- a/sys/arch/powerpc/booke/genassym.cf Wed Jun 15 17:17:37 2011 +0000
+++ b/sys/arch/powerpc/booke/genassym.cf Wed Jun 15 17:47:45 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: genassym.cf,v 1.3 2011/06/05 16:52:24 matt Exp $
+# $NetBSD: genassym.cf,v 1.4 2011/06/15 17:47:45 matt Exp $
#-
# Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
@@ -236,12 +236,6 @@
define __HAVE_FAST_SOFTINTS __HAVE_FAST_SOFTINTS
endif
-define INTRSW_CRITINTR offsetof(struct intrsw, intrsw_critintr)
-define INTRSW_DECRINTR offsetof(struct intrsw, intrsw_decrintr)
-define INTRSW_FITINTR offsetof(struct intrsw, intrsw_fitintr)
-define INTRSW_WDOGINTR offsetof(struct intrsw, intrsw_wdogintr)
-define INTRSW_EXTINTR offsetof(struct intrsw, intrsw_extintr)
-
define IPL_HIGH IPL_HIGH
define IPL_SCHED IPL_SCHED
define IPL_VM IPL_VM
diff -r 2c749c6a3531 -r a1d287bbef35 sys/arch/powerpc/booke/trap_subr.S
--- a/sys/arch/powerpc/booke/trap_subr.S Wed Jun 15 17:17:37 2011 +0000
+++ b/sys/arch/powerpc/booke/trap_subr.S Wed Jun 15 17:47:45 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap_subr.S,v 1.3 2011/06/05 16:52:24 matt Exp $ */
+/* $NetBSD: trap_subr.S,v 1.4 2011/06/15 17:47:45 matt Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -34,13 +34,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-RCSID("$NetBSD: trap_subr.S,v 1.3 2011/06/05 16:52:24 matt Exp $")
-
- .globl _C_LABEL(critintr_call)
- .globl _C_LABEL(extintr_call)
- .globl _C_LABEL(decrintr_call)
- .globl _C_LABEL(fitintr_call)
- .globl _C_LABEL(wdogintr_call)
+RCSID("$NetBSD: trap_subr.S,v 1.4 2011/06/15 17:47:45 matt Exp $")
.globl _C_LABEL(sctrapexit), _C_LABEL(trapexit), _C_LABEL(intrcall)
@@ -348,8 +342,7 @@
/* MSR[ME] is unchanged, all others cleared */
FRAME_CRIT_PROLOGUE /* save SP r26-31 CR LR XER */
FRAME_CRIT_ENTER(EXC_CII)
-_C_LABEL(critintr_call):
- bl _C_LABEL(critintr_call) /* critintr(tf) */
+ bl _C_LABEL(intr_critintr) /* critintr(tf) */
FRAME_CRIT_EXIT
.p2align 4
@@ -412,8 +405,7 @@
FRAME_INTR_PROLOGUE /* save SP r25-31 CR LR XER */
FRAME_INTR_ENTER(EXC_EXI)
-_C_LABEL(extintr_call):
- bl _C_LABEL(extintr_call)
+ bl _C_LABEL(intr_extintr)
_C_LABEL(intrcall):
GET_CPUINFO(%r6) /* get curcpu() */
lwz %r5, FRAME_SRR1(%r1) /* get saved SRR1 */
@@ -500,8 +492,7 @@
FRAME_INTR_PROLOGUE /* save SP r25-31 CR LR XER */
FRAME_INTR_ENTER(EXC_DECR)
-_C_LABEL(decrintr_call):
- bl _C_LABEL(decrintr_call)
+ bl _C_LABEL(intr_decrintr)
b intrexit
.p2align 4
@@ -510,8 +501,7 @@
FRAME_PROLOGUE /* save SP r25-31 CR LR XER */
FRAME_INTR_ENTER(EXC_FIT)
-_C_LABEL(fitintr_call):
- bl _C_LABEL(fitintr_call)
+ bl _C_LABEL(intr_fitintr)
b intrexit
.data
@@ -528,8 +518,7 @@
stb %r11,-65(%r11)
#endif
-_C_LABEL(wdogintr_call):
- bl _C_LABEL(wdogintr_call)
+ bl _C_LABEL(intr_wdogintr)
FRAME_CRIT_EXIT
.p2align 4
@@ -863,51 +852,6 @@
cmplwi %r5,0
bnelr /* return if non-0 (non-primary) */
- lis %r5,_C_LABEL(critintr_call)@ha
- lwzu %r6,_C_LABEL(critintr_call)@l(%r5)
- lwz %r7,INTRSW_CRITINTR(%r3)
- sub %r8,%r7,%r5
- add %r0,%r8,%r6
- stw %r0,0(%r5)
- dcbf 0,%r5
- icbi 0,%r5
-
- lis %r5,_C_LABEL(decrintr_call)@ha
- lwzu %r6,_C_LABEL(decrintr_call)@l(%r5)
- lwz %r7,INTRSW_DECRINTR(%r3)
- sub %r8,%r7,%r5
- add %r0,%r8,%r6
- stw %r0,0(%r5)
- dcbf 0,%r5
- icbi 0,%r5
-
- lis %r5,_C_LABEL(fitintr_call)@ha
- lwzu %r6,_C_LABEL(fitintr_call)@l(%r5)
- lwz %r7,INTRSW_FITINTR(%r3)
- sub %r8,%r7,%r5
- add %r0,%r8,%r6
- stw %r0,0(%r5)
- dcbf 0,%r5
- icbi 0,%r5
-
- lis %r5,_C_LABEL(wdogintr_call)@ha
- lwzu %r6,_C_LABEL(wdogintr_call)@l(%r5)
- lwz %r7,INTRSW_WDOGINTR(%r3)
- sub %r8,%r7,%r5
- add %r0,%r8,%r6
- stw %r0,0(%r5)
- dcbf 0,%r5
- icbi 0,%r5
-
- lis %r5,_C_LABEL(extintr_call)@ha
- lwzu %r6,_C_LABEL(extintr_call)@l(%r5)
- lwz %r7,INTRSW_EXTINTR(%r3)
- sub %r8,%r7,%r5
- add %r0,%r8,%r6
- stw %r0,0(%r5)
- dcbf 0,%r5
- icbi 0,%r5
-
lis %r5,_C_LABEL(powerpc_intrsw)@ha
stw %r3,_C_LABEL(powerpc_intrsw)@l(%r5)
diff -r 2c749c6a3531 -r a1d287bbef35 sys/arch/powerpc/powerpc/db_trace.c
--- a/sys/arch/powerpc/powerpc/db_trace.c Wed Jun 15 17:17:37 2011 +0000
+++ b/sys/arch/powerpc/powerpc/db_trace.c Wed Jun 15 17:47:45 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_trace.c,v 1.54 2011/01/18 01:02:55 matt Exp $ */
+/* $NetBSD: db_trace.c,v 1.55 2011/06/15 17:47:45 matt Exp $ */
/* $OpenBSD: db_trace.c,v 1.3 1997/03/21 02:10:48 niklas Exp $ */
/*
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.54 2011/01/18 01:02:55 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_trace.c,v 1.55 2011/06/15 17:47:45 matt Exp $");
#include "opt_ppcarch.h"
@@ -124,8 +124,7 @@
bool lwpaddr = false;
extern int trapexit[], sctrapexit[];
#ifdef PPC_BOOKE
- extern int extintr_call[], fitintr_call[], decrintr_call[];
- extern int critintr_call[], wdogintr_call[];
+ extern int intrcall[];
#endif
bool full = false;
bool in_kernel = true;
@@ -192,11 +191,7 @@
(*pr)("0x%08lx: ", frame);
if (lr + 4 == (db_addr_t) trapexit ||
#ifdef PPC_BOOKE
- lr == (db_addr_t) wdogintr_call ||
- lr == (db_addr_t) extintr_call ||
- lr == (db_addr_t) critintr_call ||
- lr == (db_addr_t) decrintr_call ||
- lr == (db_addr_t) fitintr_call ||
+ lr + 4 == (db_addr_t) intrcall ||
#endif
lr + 4 == (db_addr_t) sctrapexit) {
const char *trapstr;
diff -r 2c749c6a3531 -r a1d287bbef35 sys/arch/powerpc/powerpc/intr_stubs.c
--- a/sys/arch/powerpc/powerpc/intr_stubs.c Wed Jun 15 17:17:37 2011 +0000
+++ b/sys/arch/powerpc/powerpc/intr_stubs.c Wed Jun 15 17:47:45 2011 +0000
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr_stubs.c,v 1.1 2011/06/15 15:22:56 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr_stubs.c,v 1.2 2011/06/15 17:47:45 matt Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -164,3 +164,48 @@
{
(*powerpc_intrsw->intrsw_init)();
}
+
+void intr_critintr(struct trapframe *) __stub;
+
+void
+intr_critintr(struct trapframe *tf)
+{
+ (*powerpc_intrsw->intrsw_critintr)(tf);
+
+}
+
+void intr_extintr(struct trapframe *) __stub;
+
+void
+intr_extintr(struct trapframe *tf)
+{
+ (*powerpc_intrsw->intrsw_extintr)(tf);
+
+}
+
+void intr_decrintr(struct trapframe *) __stub;
+
+void
+intr_decrintr(struct trapframe *tf)
+{
+ (*powerpc_intrsw->intrsw_decrintr)(tf);
+
+}
+
+void intr_fitintr(struct trapframe *) __stub;
+
+void
+intr_fitintr(struct trapframe *tf)
+{
+ (*powerpc_intrsw->intrsw_fitintr)(tf);
+
+}
+
+void intr_wdogintr(struct trapframe *) __stub;
+
+void
+intr_wdogintr(struct trapframe *tf)
+{
+ (*powerpc_intrsw->intrsw_wdogintr)(tf);
+
+}
Home |
Main Index |
Thread Index |
Old Index