aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/kernel/smp_spin_table.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm64/kernel/smp_spin_table.c')
-rw-r--r--arch/arm64/kernel/smp_spin_table.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/arm64/kernel/smp_spin_table.c b/arch/arm64/kernel/smp_spin_table.c
index e3e5755f61bb..0347d38eea29 100644
--- a/arch/arm64/kernel/smp_spin_table.c
+++ b/arch/arm64/kernel/smp_spin_table.c
@@ -71,7 +71,16 @@ static int smp_spin_table_cpu_prepare(unsigned int cpu)
return -ENODEV;
release_addr = __va(cpu_release_addr[cpu]);
- release_addr[0] = (void *)__pa(secondary_holding_pen);
+
+ /*
+ * We write the release address as LE regardless of the native
+ * endianess of the kernel. Therefore, any boot-loaders that
+ * read this address need to convert this address to the
+ * boot-loader's endianess before jumping. This is mandated by
+ * the boot protocol.
+ */
+ release_addr[0] = (void *) cpu_to_le64(__pa(secondary_holding_pen));
+
__flush_dcache_area(release_addr, sizeof(release_addr[0]));
/*