Module Name: src Committed By: ryo Date: Thu Oct 4 08:58:13 UTC 2018
Modified Files: src/sys/arch/arm/fdt: cpu_fdt.c Log Message: fix to boot APs of RPI3 with GENERIC64. if no psci, try other methods. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 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.14 src/sys/arch/arm/fdt/cpu_fdt.c:1.15 --- src/sys/arch/arm/fdt/cpu_fdt.c:1.14 Thu Sep 13 12:53:00 2018 +++ src/sys/arch/arm/fdt/cpu_fdt.c Thu Oct 4 08:58:13 2018 @@ -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 <jmcne...@invisible.ca> @@ -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 @@ arm_fdt_cpu_bootstrap(void) 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 @@ arm_fdt_cpu_bootstrap(void) #if NPSCI_FDT > 0 if (psci_fdt_preinit() != 0) - return; + nopsci = true; #endif /* MPIDR affinity levels of boot processor. */ @@ -299,7 +302,7 @@ arm_fdt_cpu_bootstrap(void) 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;