Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/fdt flush the dcache in cpu_enable_psci() befor...



details:   https://anonhg.NetBSD.org/src/rev/0141c4f34aba
branches:  trunk
changeset: 460278:0141c4f34aba
user:      bad <bad%NetBSD.org@localhost>
date:      Tue Oct 15 17:25:02 2019 +0000

description:
flush the dcache in cpu_enable_psci() before calling psci_cpu_on().

fixes the kernel hanging with multiple "mpstart" on (at least) NanoPi R1.

OK jmcneill@, skrll@

XXX pullup-9

diffstat:

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

diffs (26 lines):

diff -r e3e469c15f56 -r 0141c4f34aba sys/arch/arm/fdt/cpu_fdt.c
--- a/sys/arch/arm/fdt/cpu_fdt.c        Tue Oct 15 17:19:05 2019 +0000
+++ b/sys/arch/arm/fdt/cpu_fdt.c        Tue Oct 15 17:25:02 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_fdt.c,v 1.25 2019/04/13 19:15:25 jmcneill Exp $ */
+/* $NetBSD: cpu_fdt.c,v 1.26 2019/10/15 17:25:02 bad 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 2019/04/13 19:15:25 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_fdt.c,v 1.26 2019/10/15 17:25:02 bad Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -348,6 +348,7 @@
 
        fdtbus_get_reg64(phandle, 0, &mpidr, NULL);
 
+       cpu_dcache_wbinv_all();
        ret = psci_cpu_on(mpidr, cpu_fdt_mpstart_pa(), 0);
        if (ret != PSCI_SUCCESS)
                return EIO;



Home | Main Index | Thread Index | Old Index