From: Josh Poimboeuf <jpoimboe@kernel.org>
To: "Paul E. McKenney" <paulmck@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
sfr@canb.auug.org.au, linux-kernel@vger.kernel.org
Subject: Re: objtool warning for next-20221118
Date: Tue, 31 Jan 2023 16:02:47 -0800 [thread overview]
Message-ID: <20230201000247.3x3jev6xxxxkfrnm@treble> (raw)
In-Reply-To: <20230128190634.GA1043262@paulmck-ThinkPad-P17-Gen-1>
On Sat, Jan 28, 2023 at 11:06:34AM -0800, Paul E. McKenney wrote:
> Sorry to be a nag, but I am still seeing this. Not a huge problem because
> I now filter it out so that it does not get in the way of other bugs,
> but I figured that I should follow up.
Does this fix it? (works for me)
If so, I'll need to extend it for all arches.
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 40d156a31676..5db0daba750f 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -712,6 +712,7 @@ void arch_cpu_idle_enter(void)
void arch_cpu_idle_dead(void)
{
play_dead();
+ BUG();
}
/*
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 314802f98b9d..7fbbd1572288 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -185,7 +185,7 @@ void arch_cpu_idle(void);
void arch_cpu_idle_prepare(void);
void arch_cpu_idle_enter(void);
void arch_cpu_idle_exit(void);
-void arch_cpu_idle_dead(void);
+void __noreturn arch_cpu_idle_dead(void);
int cpu_report_state(int cpu);
int cpu_check_up_prepare(int cpu);
diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
index f26ab2675f7d..921b8b3e3d0c 100644
--- a/kernel/sched/idle.c
+++ b/kernel/sched/idle.c
@@ -71,7 +71,7 @@ static noinline int __cpuidle cpu_idle_poll(void)
void __weak arch_cpu_idle_prepare(void) { }
void __weak arch_cpu_idle_enter(void) { }
void __weak arch_cpu_idle_exit(void) { }
-void __weak arch_cpu_idle_dead(void) { }
+void __weak arch_cpu_idle_dead(void) { while (1); }
void __weak arch_cpu_idle(void)
{
cpu_idle_force_poll = 1;
diff --git a/tools/objtool/check.c b/tools/objtool/check.c
index 4b7c8b33069e..a9cb925bf095 100644
--- a/tools/objtool/check.c
+++ b/tools/objtool/check.c
@@ -167,6 +167,7 @@ static bool __dead_end_function(struct objtool_file *file, struct symbol *func,
"__reiserfs_panic",
"__stack_chk_fail",
"__ubsan_handle_builtin_unreachable",
+ "arch_cpu_idle_dead",
"cpu_bringup_and_idle",
"cpu_startup_entry",
"do_exit",
next prev parent reply other threads:[~2023-02-01 0:02 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-21 4:07 Paul E. McKenney
2022-11-21 11:31 ` Peter Zijlstra
2022-11-21 14:52 ` Paul E. McKenney
2022-11-22 5:16 ` Josh Poimboeuf
2022-11-22 8:35 ` Peter Zijlstra
2022-11-23 0:22 ` Paul E. McKenney
2022-11-23 1:48 ` Josh Poimboeuf
2022-11-23 17:49 ` Paul E. McKenney
2022-11-23 18:19 ` Josh Poimboeuf
2022-11-23 19:12 ` Paul E. McKenney
2022-11-23 22:32 ` Josh Poimboeuf
2022-11-23 23:06 ` Paul E. McKenney
2023-01-28 19:06 ` Paul E. McKenney
2023-02-01 0:02 ` Josh Poimboeuf [this message]
2023-02-01 0:33 ` Paul E. McKenney
2023-02-01 4:21 ` Paul E. McKenney
2022-11-23 1:23 ` Josh Poimboeuf
2022-11-23 8:55 ` Peter Zijlstra
2022-11-23 10:52 ` Andrew Cooper
2022-11-23 17:03 ` Josh Poimboeuf
2022-11-24 2:39 ` Josh Poimboeuf
2022-11-24 5:28 ` Juergen Gross
2022-11-24 7:47 ` Juergen Gross
2022-11-24 16:39 ` Josh Poimboeuf
2022-11-25 5:30 ` Juergen Gross
2022-11-29 19:56 ` Paul E. McKenney
2022-12-02 0:27 ` Paul E. McKenney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230201000247.3x3jev6xxxxkfrnm@treble \
--to=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®