aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64/arm64/mp_machdep.c
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2016-10-25 14:18:27 +0000
committerAndrew Turner <andrew@FreeBSD.org>2016-10-25 14:18:27 +0000
commitc2dd354bf4d3f8256d9e35d184369f939db96b96 (patch)
treec6511fb045a752d02d74497b93c0f1037ab97a35 /sys/arm64/arm64/mp_machdep.c
parent02e1c9861d9037f5ca8a880de763dd9673b6bece (diff)
downloadsrc-c2dd354bf4d3f8256d9e35d184369f939db96b96.tar.gz
src-c2dd354bf4d3f8256d9e35d184369f939db96b96.zip
Create a new PSCI error code and use it to signal that starting the CPU is
impossible as the PSCI firmware is missing. Sponsored by: ABT Systmes Ltd
Notes
Notes: svn path=/head/; revision=307910
Diffstat (limited to 'sys/arm64/arm64/mp_machdep.c')
-rw-r--r--sys/arm64/arm64/mp_machdep.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c
index 6fbb610dd6c0..4361cef888a1 100644
--- a/sys/arm64/arm64/mp_machdep.c
+++ b/sys/arm64/arm64/mp_machdep.c
@@ -461,9 +461,13 @@ cpu_init_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg)
err = psci_cpu_on(target_cpu, pa, cpuid);
if (err != PSCI_RETVAL_SUCCESS) {
- /* Panic here if INVARIANTS are enabled */
- KASSERT(0, ("Failed to start CPU %u (%lx)\n", id,
- target_cpu));
+ /*
+ * Panic here if INVARIANTS are enabled and PSCI failed to
+ * start the requested CPU. If psci_cpu_on returns PSCI_MISSING
+ * to indicate we are unable to use it to start the given CPU.
+ */
+ KASSERT(err == PSCI_MISSING,
+ ("Failed to start CPU %u (%lx)\n", id, target_cpu));
pcpu_destroy(pcpup);
kmem_free(kernel_arena, (vm_offset_t)dpcpu[cpuid - 1],