Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/powerpc/pic Make sure OEA ports without __HAVE_FAST...
details: https://anonhg.NetBSD.org/src/rev/1196d3ba2090
branches: trunk
changeset: 766121:1196d3ba2090
user: matt <matt%NetBSD.org@localhost>
date: Thu Jun 16 04:37:48 2011 +0000
description:
Make sure OEA ports without __HAVE_FAST_SOFTINTS still compile.
diffstat:
sys/arch/powerpc/pic/intr.c | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
diffs (59 lines):
diff -r f24fceb3911a -r 1196d3ba2090 sys/arch/powerpc/pic/intr.c
--- a/sys/arch/powerpc/pic/intr.c Thu Jun 16 04:25:13 2011 +0000
+++ b/sys/arch/powerpc/pic/intr.c Thu Jun 16 04:37:48 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: intr.c,v 1.12 2011/06/16 02:43:43 macallan Exp $ */
+/* $NetBSD: intr.c,v 1.13 2011/06/16 04:37:48 matt Exp $ */
/*-
* Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.12 2011/06/16 02:43:43 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.13 2011/06/16 04:37:48 matt Exp $");
#include "opt_multiprocessor.h"
@@ -693,6 +693,18 @@
return ocpl;
}
+static inline bool
+have_pending_intr_p(struct cpu_info *ci, int ncpl)
+{
+ if (ci->ci_ipending & ~imask[ncpl])
+ return true;
+#ifdef __HAVE_FAST_SOFTINTS
+ if ((ci->ci_data.cpu_softints << ncpl) & IPL_SOFTMASK)
+ return true;
+#endif
+ return false;
+}
+
void
splx(int ncpl)
{
@@ -701,9 +713,9 @@
__insn_barrier();
__asm volatile("sync; eieio"); /* reorder protect */
ci->ci_cpl = ncpl;
- if ((ci->ci_ipending & ~imask[ncpl]) ||
- ((ci->ci_data.cpu_softints << ncpl) & IPL_SOFTMASK))
+ if (have_pending_intr_p(ci, ncpl))
pic_do_pending_int();
+
__asm volatile("sync; eieio"); /* reorder protect */
}
@@ -717,8 +729,7 @@
__asm volatile("sync; eieio"); /* reorder protect */
ocpl = ci->ci_cpl;
ci->ci_cpl = ncpl;
- if ((ci->ci_ipending & ~imask[ncpl]) ||
- ((ci->ci_data.cpu_softints << ncpl) & IPL_SOFTMASK))
+ if (have_pending_intr_p(ci, ncpl))
pic_do_pending_int();
__asm volatile("sync; eieio"); /* reorder protect */
return ocpl;
Home |
Main Index |
Thread Index |
Old Index