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 fix to boot APs of RPI3 with GENERIC64.



details:   https://anonhg.NetBSD.org/src/rev/dffe51619b1c
branches:  trunk
changeset: 836220:dffe51619b1c
user:      ryo <ryo%NetBSD.org@localhost>
date:      Thu Oct 04 08:58:13 2018 +0000

description:
fix to boot APs of RPI3 with GENERIC64.
if no psci, try other methods.

diffstat:

 sys/arch/arm/fdt/cpu_fdt.c |  11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diffs (46 lines):

diff -r 56d5955e438f -r dffe51619b1c sys/arch/arm/fdt/cpu_fdt.c
--- a/sys/arch/arm/fdt/cpu_fdt.c        Thu Oct 04 07:43:12 2018 +0000
+++ b/sys/arch/arm/fdt/cpu_fdt.c        Thu Oct 04 08:58:13 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_fdt.c,v 1.14 2018/09/13 12:53:00 jmcneill Exp $ */
+/* $NetBSD: cpu_fdt.c,v 1.15 2018/10/04 08:58:13 ryo 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.14 2018/09/13 12:53:00 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_fdt.c,v 1.15 2018/10/04 08:58:13 ryo Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -236,6 +236,9 @@
        u_int cpuindex;
        int child, ret;
        const char *method;
+#if NPSCI_FDT > 0
+       bool nopsci = false;
+#endif
 
        const int cpus = OF_finddevice("/cpus");
        if (cpus == -1) {
@@ -252,7 +255,7 @@
 
 #if NPSCI_FDT > 0
        if (psci_fdt_preinit() != 0)
-               return;
+               nopsci = true;
 #endif
 
        /* MPIDR affinity levels of boot processor. */
@@ -299,7 +302,7 @@
                                continue;
 
 #if NPSCI_FDT > 0
-               } else if (strcmp(method, "psci") == 0) {
+               } else if (!nopsci && (strcmp(method, "psci") == 0)) {
                        ret = psci_cpu_on(mpidr, cpu_fdt_mpstart_pa(), 0);
                        if (ret != PSCI_SUCCESS)
                                continue;



Home | Main Index | Thread Index | Old Index