Source-Changes-HG archive

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

[src/netbsd-9]: src/sys/arch/arm/fdt Pull up following revision(s) (requested...



details:   https://anonhg.NetBSD.org/src/rev/febacf724d64
branches:  netbsd-9
changeset: 963201:febacf724d64
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Nov 01 18:12:26 2019 +0000

description:
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.

diffstat:

 sys/arch/arm/fdt/cpu_fdt.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (33 lines):

diff -r d71e7434d612 -r febacf724d64 sys/arch/arm/fdt/cpu_fdt.c
--- a/sys/arch/arm/fdt/cpu_fdt.c        Fri Nov 01 09:37:31 2019 +0000
+++ b/sys/arch/arm/fdt/cpu_fdt.c        Fri Nov 01 18:12:26 2019 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
 #include "psci_fdt.h"
 
 #include <sys/cdefs.h>
-__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 <sys/param.h>
 #include <sys/atomic.h>
@@ -347,6 +347,14 @@
 
        fdtbus_get_reg64(phandle, 0, &mpidr, 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;



Home | Main Index | Thread Index | Old Index