Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/powerpc/oea register the IPI before spinning up CPU...



details:   https://anonhg.NetBSD.org/src/rev/d93eae3309cd
branches:  trunk
changeset: 1004346:d93eae3309cd
user:      macallan <macallan%NetBSD.org@localhost>
date:      Fri Oct 25 17:17:30 2019 +0000

description:
register the IPI before spinning up CPUs, and make sure to do it exactly once
with this, and previous commits, G5s with four CPUs work
tested by Romain Dolbeau

diffstat:

 sys/arch/powerpc/oea/cpu_subr.c |  14 ++++++++------
 1 files changed, 8 insertions(+), 6 deletions(-)

diffs (42 lines):

diff -r ae1bfbd34e99 -r d93eae3309cd sys/arch/powerpc/oea/cpu_subr.c
--- a/sys/arch/powerpc/oea/cpu_subr.c   Fri Oct 25 16:50:17 2019 +0000
+++ b/sys/arch/powerpc/oea/cpu_subr.c   Fri Oct 25 17:17:30 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu_subr.c,v 1.101 2019/09/20 21:27:29 macallan Exp $  */
+/*     $NetBSD: cpu_subr.c,v 1.102 2019/10/25 17:17:30 macallan Exp $  */
 
 /*-
  * Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.101 2019/09/20 21:27:29 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.102 2019/10/25 17:17:30 macallan Exp $");
 
 #include "opt_ppcparam.h"
 #include "opt_ppccache.h"
@@ -452,6 +452,12 @@
        ci->ci_dev = self;
        ci->ci_idlespin = cpu_idlespin;
 
+#ifdef MULTIPROCESSOR
+       /* Register IPI Interrupt */
+       if ((ipiops.ppc_establish_ipi) && (id == 0))
+               ipiops.ppc_establish_ipi(IST_LEVEL, IPL_HIGH, NULL);
+#endif
+
        pvr = mfpvr();
        vers = (pvr >> 16) & 0xffff;
 
@@ -1408,10 +1414,6 @@
                return -1;
        }
 
-       /* Register IPI Interrupt */
-       if (ipiops.ppc_establish_ipi)
-               ipiops.ppc_establish_ipi(IST_LEVEL, IPL_HIGH, NULL);
-
        return 0;
 }
 



Home | Main Index | Thread Index | Old Index