diff mbox series

[10/12] parisc: Move common_stext into text section when CONFIG_HOTPLUG_CPU=y

Message ID 20220325143833.402631-10-deller@gmx.de (mailing list archive)
State Superseded
Headers show
Series [01/12] parisc: Switch from GENERIC_CPU_DEVICES to GENERIC_ARCH_TOPOLOGY | expand

Commit Message

Helge Deller March 25, 2022, 2:38 p.m. UTC
Move the common_stext function into the non-init text section if hotplug
is enabled. This function is called from the firmware when secondary
CPUS are brought up when CPU hotplug is enabled.

Signed-off-by: Helge Deller <deller@gmx.de>
---
 arch/parisc/kernel/head.S | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

--
2.35.1
diff mbox series

Patch

diff --git a/arch/parisc/kernel/head.S b/arch/parisc/kernel/head.S
index b24f77748c22..e0a9e9657622 100644
--- a/arch/parisc/kernel/head.S
+++ b/arch/parisc/kernel/head.S
@@ -162,6 +162,15 @@  $pgt_fill_loop:
 	/* FALLTHROUGH */
 	.procend

+#ifdef CONFIG_HOTPLUG_CPU
+	/* common_stext is far away in another section... jump there */
+	load32		PA(common_stext), %rp
+	bv,n		(%rp)
+
+	/* common_stext and smp_slave_stext needs to be in text section */
+	.text
+#endif
+
 	/*
 	** Code Common to both Monarch and Slave processors.
 	** Entry:
@@ -371,8 +380,6 @@  smp_slave_stext:
 	.procend
 #endif /* CONFIG_SMP */

-ENDPROC(parisc_kernel_start)
-
 #ifndef CONFIG_64BIT
 	.section .data..ro_after_init