Module Name: src Committed By: macallan Date: Fri Oct 25 17:17:30 UTC 2019
Modified Files: src/sys/arch/powerpc/oea: cpu_subr.c Log Message: 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 To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.102 src/sys/arch/powerpc/oea/cpu_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/powerpc/oea/cpu_subr.c diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.101 src/sys/arch/powerpc/oea/cpu_subr.c:1.102 --- src/sys/arch/powerpc/oea/cpu_subr.c:1.101 Fri Sep 20 21:27:29 2019 +++ src/sys/arch/powerpc/oea/cpu_subr.c Fri Oct 25 17:17:30 2019 @@ -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 @@ cpu_attach_common(device_t self, int id) 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 @@ cpu_spinup(device_t self, struct cpu_inf return -1; } - /* Register IPI Interrupt */ - if (ipiops.ppc_establish_ipi) - ipiops.ppc_establish_ipi(IST_LEVEL, IPL_HIGH, NULL); - return 0; }