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 first step to address PR54331:
details: https://anonhg.NetBSD.org/src/rev/161bda9aced1
branches: trunk
changeset: 462966:161bda9aced1
user: macallan <macallan%NetBSD.org@localhost>
date: Fri Aug 02 05:08:07 2019 +0000
description:
first step to address PR54331:
poll h->hatch_running for a bit instead of blindly relying on a fixed timeout
for secondary CPUs to wake up and get ready
needs more testing, possibly pullup
diffstat:
sys/arch/powerpc/oea/cpu_subr.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r 83f66ee519c1 -r 161bda9aced1 sys/arch/powerpc/oea/cpu_subr.c
--- a/sys/arch/powerpc/oea/cpu_subr.c Fri Aug 02 05:04:02 2019 +0000
+++ b/sys/arch/powerpc/oea/cpu_subr.c Fri Aug 02 05:08:07 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_subr.c,v 1.99 2019/02/06 07:32:50 mrg Exp $ */
+/* $NetBSD: cpu_subr.c,v 1.100 2019/08/02 05:08:07 macallan Exp $ */
/*-
* Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.99 2019/02/06 07:32:50 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.100 2019/08/02 05:08:07 macallan Exp $");
#include "opt_ppcparam.h"
#include "opt_ppccache.h"
@@ -1381,6 +1381,17 @@
__asm volatile ("dcbst 0,%0"::"r"(&h->hatch_running):"memory");
__asm volatile ("sync; isync");
#endif
+ int hatch_bail = 0;
+ while ((h->hatch_running < 1) && (hatch_bail < 100000)) {
+ delay(1);
+ hatch_bail++;
+#ifdef CACHE_PROTO_MEI
+ __asm volatile ("dcbi 0,%0"::"r"(&h->hatch_running):"memory");
+ __asm volatile ("sync; isync");
+ __asm volatile ("dcbst 0,%0"::"r"(&h->hatch_running):"memory");
+ __asm volatile ("sync; isync");
+#endif
+ }
if (h->hatch_running < 1) {
#ifdef CACHE_PROTO_MEI
__asm volatile ("dcbi 0,%0"::"r"(&cpu_spinstart_ack):"memory");
Home |
Main Index |
Thread Index |
Old Index