Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/playstation2/playstation2 Change cpu_intr prototype...
details: https://anonhg.NetBSD.org/src/rev/81ae7807b3cb
branches: trunk
changeset: 346567:81ae7807b3cb
user: maya <maya%NetBSD.org@localhost>
date: Tue Jul 19 13:58:09 2016 +0000
description:
Change cpu_intr prototype to new one, to avoid conflicts.
Make the function resemble typical cpu_intr code.
diffstat:
sys/arch/playstation2/playstation2/interrupt.c | 32 ++++++++++++++-----------
1 files changed, 18 insertions(+), 14 deletions(-)
diffs (66 lines):
diff -r cce3b2b1f263 -r 81ae7807b3cb sys/arch/playstation2/playstation2/interrupt.c
--- a/sys/arch/playstation2/playstation2/interrupt.c Tue Jul 19 13:50:02 2016 +0000
+++ b/sys/arch/playstation2/playstation2/interrupt.c Tue Jul 19 13:58:09 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: interrupt.c,v 1.13 2016/07/19 13:50:02 maya Exp $ */
+/* $NetBSD: interrupt.c,v 1.14 2016/07/19 13:58:09 maya Exp $ */
/*-
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.13 2016/07/19 13:50:02 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.14 2016/07/19 13:58:09 maya Exp $");
#include "debug_playstation2.h"
#if defined INTR_DEBUG && !defined GSFB_DEBUG_MONITOR
@@ -122,31 +122,35 @@
* Hardware interrupt support
*/
void
-cpu_intr(u_int32_t status, u_int32_t cause, u_int32_t pc, u_int32_t ipending)
+cpu_intr(int ppl, vaddr_t pc, uint32_t status)
{
struct cpu_info *ci;
-
+ uint32_t ipending;
+ int ipl;
#if 0
_debug_print_intr(__func__);
#endif
ci = curcpu();
ci->ci_idepth++;
- uvmexp.intrs++;
+ ci->ci_data.cpu_nintr++;
- playstation2_clockframe.ppl = md_imask;
+ playstation2_clockframe.intr = (curcpu()->ci_idepth > 1);
playstation2_clockframe.sr = status;
playstation2_clockframe.pc = pc;
- if (ipending & MIPS_INT_MASK_0) {
- intc_intr(md_imask);
+ while (ppl < (ipl = splintr(&ipending))) {
+ splx(ipl);
+ if (ipending & MIPS_INT_MASK_0) {
+ intc_intr(md_imask);
+ }
+
+ if (ipending & MIPS_INT_MASK_1) {
+ _playstation2_evcnt.dmac.ev_count++;
+ dmac_intr(md_imask);
+ }
+ (void)splhigh();
}
-
- if (ipending & MIPS_INT_MASK_1) {
- _playstation2_evcnt.dmac.ev_count++;
- dmac_intr(md_imask);
- }
- ci->ci_idepth--;
}
void
setsoft(int ipl)
Home |
Main Index |
Thread Index |
Old Index