Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/booke Don't use numeric constants for SPR. ...
details: https://anonhg.NetBSD.org/src/rev/47138055989d
branches: trunk
changeset: 331086:47138055989d
user: matt <matt%NetBSD.org@localhost>
date: Thu Jul 31 01:01:55 2014 +0000
description:
Don't use numeric constants for SPR. Use the symbolic name (SPR_PIR).
Add DBSR_BRT to KASSERT
diffstat:
sys/arch/powerpc/booke/trap.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r 58d29a7c2a0f -r 47138055989d sys/arch/powerpc/booke/trap.c
--- a/sys/arch/powerpc/booke/trap.c Thu Jul 31 00:58:02 2014 +0000
+++ b/sys/arch/powerpc/booke/trap.c Thu Jul 31 01:01:55 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.24 2014/07/30 23:56:01 joerg Exp $ */
+/* $NetBSD: trap.c,v 1.25 2014/07/31 01:01:55 matt Exp $ */
/*-
* Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -38,7 +38,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.24 2014/07/30 23:56:01 joerg Exp $");
+__KERNEL_RCSID(1, "$NetBSD: trap.c,v 1.25 2014/07/31 01:01:55 matt Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -428,7 +428,9 @@
}
if (OPC_MFSPR_P(opcode, SPR_PIR)) {
- __asm ("mfspr %0, 286" : "=r"(tf->tf_fixreg[OPC_MFSPR_REG(opcode)]));
+ __asm ("mfspr %0, %1"
+ : "=r"(tf->tf_fixreg[OPC_MFSPR_REG(opcode)])
+ : "n"(SPL_PIR));
return true;
}
@@ -525,7 +527,7 @@
* Ack the interrupt.
*/
mtspr(SPR_DBSR, tf->tf_esr);
- KASSERT(tf->tf_esr & (DBSR_IAC1|DBSR_IAC2));
+ KASSERT(tf->tf_esr & (DBSR_IAC1|DBSR_IAC2|DBSR_BRT));
KASSERT((tf->tf_srr1 & PSL_SE) == 0);
/*
Home |
Main Index |
Thread Index |
Old Index