Module Name:src
Committed By: martin
Date: Fri Nov 1 18:12:26 UTC 2019
Modified Files:
src/sys/arch/arm/fdt [netbsd-9]: cpu_fdt.c
Log Message:
Pull up following revision(s) (requested by bad in ticket #342):
sys/arch/arm/fdt/cpu_fdt.c: revision 1.29
sys/arch/arm/fdt/cpu_fdt.c: revision 1.30
re-apply r1.26:
flush the dcache in cpu_enable_psci() before calling psci_cpu_on().
fixes the kernel hanging with multiple "mpstart" on (at least) NanoPi R1.
but only #if !defined(AARCH64).
not necessary on armv8 and cache ops are not available that early there.
fix typos in comment in previous.
To generate a diff of this commit:
cvs rdiff -u -r1.25.4.1 -r1.25.4.2 src/sys/arch/arm/fdt/cpu_fdt.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/arm/fdt/cpu_fdt.c
diff -u src/sys/arch/arm/fdt/cpu_fdt.c:1.25.4.1 src/sys/arch/arm/fdt/cpu_fdt.c:1.25.4.2
--- src/sys/arch/arm/fdt/cpu_fdt.c:1.25.4.1 Wed Oct 23 19:14:19 2019
+++ src/sys/arch/arm/fdt/cpu_fdt.c Fri Nov 1 18:12:26 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_fdt.c,v 1.25.4.1 2019/10/23 19:14:19 martin Exp $ */
+/* $NetBSD: cpu_fdt.c,v 1.25.4.2 2019/11/01 18:12:26 martin Exp $ */
/*-
* Copyright (c) 2017 Jared McNeill
@@ -30,7 +30,7 @@
#include "psci_fdt.h"
#include
-__KERNEL_RCSID(0, "$NetBSD: cpu_fdt.c,v 1.25.4.1 2019/10/23 19:14:19 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_fdt.c,v 1.25.4.2 2019/11/01 18:12:26 martin Exp $");
#include
#include
@@ -347,6 +347,14 @@ cpu_enable_psci(int phandle)
fdtbus_get_reg64(phandle, 0, , NULL);
+#if !defined(AARCH64)
+ /*
+ * not necessary on AARCH64. beside there it hangs the system
+ * because cache ops are only functional after cpu_attach()
+ * was called.
+ */
+ cpu_dcache_wbinv_all();
+#endif
ret = psci_cpu_on(mpidr, cpu_fdt_mpstart_pa(), 0);
if (ret != PSCI_SUCCESS)
return EIO;