summaryrefslogtreecommitdiffstats
path: root/arch/loongarch/kernel/process.c
diff options
context:
space:
mode:
authorTiezhu Yang <yangtiezhu@loongson.cn>2023-08-25 23:40:38 +0800
committerHuacai Chen <chenhuacai@loongson.cn>2023-08-25 23:40:38 +0800
commitc337c849ab528241897ddfb6f334912ead0bfd66 (patch)
tree5d6d2b56026b92f6bed77c30b0a2b810657560bc /arch/loongarch/kernel/process.c
parent8879515e1219857df1f142e23840b91a37cbde88 (diff)
downloadlinux-stable-c337c849ab528241897ddfb6f334912ead0bfd66.tar.gz
linux-stable-c337c849ab528241897ddfb6f334912ead0bfd66.tar.bz2
linux-stable-c337c849ab528241897ddfb6f334912ead0bfd66.zip
LoongArch: Put the body of play_dead() into arch_cpu_idle_dead()
The initial aim is to silence the following objtool warning: arch/loongarch/kernel/process.o: warning: objtool: arch_cpu_idle_dead() falls through to next function start_thread() According to tools/objtool/Documentation/objtool.txt, this is because the last instruction of arch_cpu_idle_dead() is a call to a noreturn function play_dead(). In order to silence the warning, one simple way is to add the noreturn function play_dead() to objtool's hard-coded global_noreturns array, that is to say, just put "NORETURN(play_dead)" into tools/objtool/noreturns.h, it works well. But I noticed that play_dead() is only defined once and only called by arch_cpu_idle_dead(), so put the body of play_dead() into the caller arch_cpu_idle_dead(), then remove the noreturn function play_dead() is an alternative way which can reduce the overhead of the function call at the same time. Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'arch/loongarch/kernel/process.c')
-rw-r--r--arch/loongarch/kernel/process.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/loongarch/kernel/process.c b/arch/loongarch/kernel/process.c
index 2e04eb07abb6..4ee1e9d6a65f 100644
--- a/arch/loongarch/kernel/process.c
+++ b/arch/loongarch/kernel/process.c
@@ -61,13 +61,6 @@ EXPORT_SYMBOL(__stack_chk_guard);
unsigned long boot_option_idle_override = IDLE_NO_OVERRIDE;
EXPORT_SYMBOL(boot_option_idle_override);
-#ifdef CONFIG_HOTPLUG_CPU
-void __noreturn arch_cpu_idle_dead(void)
-{
- play_dead();
-}
-#endif
-
asmlinkage void ret_from_fork(void);
asmlinkage void ret_from_kernel_thread(void);