Skip to content

Commit 63f4236

Browse files
chenhuacaijfvogel
authored andcommitted
LoongArch: Move __arch_cpu_idle() to .cpuidle.text section
commit 3e245b7b74c3a2ead5fa4bad27cc275284c75189 upstream. Now arch_cpu_idle() is annotated with __cpuidle which means it is in the .cpuidle.text section, but __arch_cpu_idle() isn't. Thus, fix the missing .cpuidle.text section assignment for __arch_cpu_idle() in order to correct backtracing with nmi_backtrace(). The principle is similar to the commit 97c8580 ("MIPS: Annotate cpu_wait implementations with __cpuidle") Cc: [email protected] Signed-off-by: Huacai Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> (cherry picked from commit 66a309b4d5bdbe59b53957246fe87af1c95a6691) Signed-off-by: Jack Vogel <[email protected]>
1 parent ea11416 commit 63f4236

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

arch/loongarch/kernel/genex.S

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <asm/stackframe.h>
1717
#include <asm/thread_info.h>
1818

19+
.section .cpuidle.text, "ax"
1920
.align 5
2021
SYM_FUNC_START(__arch_cpu_idle)
2122
/* start of idle interrupt region */
@@ -31,14 +32,16 @@ SYM_FUNC_START(__arch_cpu_idle)
3132
*/
3233
idle 0
3334
/* end of idle interrupt region */
34-
1: jr ra
35+
idle_exit:
36+
jr ra
3537
SYM_FUNC_END(__arch_cpu_idle)
38+
.previous
3639

3740
SYM_CODE_START(handle_vint)
3841
UNWIND_HINT_UNDEFINED
3942
BACKUP_T0T1
4043
SAVE_ALL
41-
la_abs t1, 1b
44+
la_abs t1, idle_exit
4245
LONG_L t0, sp, PT_ERA
4346
/* 3 instructions idle interrupt region */
4447
ori t0, t0, 0b1100

0 commit comments

Comments
 (0)