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 Panic when an ipi is sent to unknown ...



details:   https://anonhg.NetBSD.org/src/rev/4a3532006c41
branches:  trunk
changeset: 766644:4a3532006c41
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Jun 29 05:55:47 2011 +0000

description:
Panic when an ipi is sent to unknown cpu.

diffstat:

 sys/arch/powerpc/booke/e500_intr.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r e757d6be6e7b -r 4a3532006c41 sys/arch/powerpc/booke/e500_intr.c
--- a/sys/arch/powerpc/booke/e500_intr.c        Wed Jun 29 05:53:44 2011 +0000
+++ b/sys/arch/powerpc/booke/e500_intr.c        Wed Jun 29 05:55:47 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: e500_intr.c,v 1.13 2011/06/25 00:07:10 matt Exp $      */
+/*     $NetBSD: e500_intr.c,v 1.14 2011/06/29 05:55:47 matt Exp $      */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -1132,7 +1132,7 @@
        struct cpu_softc * const cpu = ci->ci_softc;
        uint32_t dstmask;
 
-       if (target >= ncpu) {
+       if (target >= CPU_MAXNUM) {
                CPU_INFO_ITERATOR cii;
                struct cpu_info *dst_ci;
 
@@ -1149,7 +1149,10 @@
                }
        } else {
                struct cpu_info * const dst_ci = cpu_lookup(target);
-               KASSERT(target == cpu_index(dst_ci));
+               KASSERT(dst_ci != NULL);
+               KASSERTMSG(target == cpu_index(dst_ci),
+                   ("%s: target (%lu) != cpu_index(cpu%u)",
+                    __func__, target, cpu_index(dst_ci)));
                dstmask = (1 << target);
                if (ipimsg)
                        atomic_or_32(&dst_ci->ci_pending_ipis, ipimsg);



Home | Main Index | Thread Index | Old Index