Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/sys/arch/powerpc/pic Pull up following revision(s) (reque...



details:   https://anonhg.NetBSD.org/src/rev/e2002389214a
branches:  netbsd-6
changeset: 774203:e2002389214a
user:      riz <riz%NetBSD.org@localhost>
date:      Tue Jun 12 19:35:46 2012 +0000

description:
Pull up following revision(s) (requested by macallan in ticket #320):
        sys/arch/powerpc/pic/intr.c: revision 1.21
        sys/arch/powerpc/pic/intr.c: revision 1.22
look at the right cpu_softints bits in pic_do_pending_int()
so we call the right softint handlers
fix same thinko as in previous commit, in have_pending_intr_p()

diffstat:

 sys/arch/powerpc/pic/intr.c |  12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diffs (40 lines):

diff -r 79b32558bf81 -r e2002389214a sys/arch/powerpc/pic/intr.c
--- a/sys/arch/powerpc/pic/intr.c       Tue Jun 12 19:31:50 2012 +0000
+++ b/sys/arch/powerpc/pic/intr.c       Tue Jun 12 19:35:46 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: intr.c,v 1.20 2012/02/01 09:54:03 matt Exp $ */
+/*     $NetBSD: intr.c,v 1.20.2.1 2012/06/12 19:35:46 riz Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.20 2012/02/01 09:54:03 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.20.2.1 2012/06/12 19:35:46 riz Exp $");
 
 #include "opt_interrupt.h"
 #include "opt_multiprocessor.h"
@@ -508,7 +508,11 @@
        }
 
 #ifdef __HAVE_FAST_SOFTINTS
-       const u_int softints = (ci->ci_data.cpu_softints << pcpl) & IPL_SOFTMASK;
+       const u_int softints = ci->ci_data.cpu_softints &
+                                (IPL_SOFTMASK << pcpl);
+
+       /* make sure there are no bits to screw with the line above */
+       KASSERT((ci->ci_data.cpu_softints & ~IPL_SOFTMASK) == 0);
 
        if (__predict_false(softints != 0)) {
                ci->ci_cpl = IPL_HIGH;
@@ -618,7 +622,7 @@
        if (ci->ci_ipending & ~imask[ncpl])
                return true;
 #ifdef __HAVE_FAST_SOFTINTS
-       if ((ci->ci_data.cpu_softints << ncpl) & IPL_SOFTMASK)
+       if (ci->ci_data.cpu_softints & (IPL_SOFTMASK << ncpl))
                return true;
 #endif
        return false;



Home | Main Index | Thread Index | Old Index