From: "Arnd Bergmann" <arnd@arndb.de>
To: "Peter Zijlstra" <peterz@infradead.org>
Cc: "Naresh Kamboju" <naresh.kamboju@linaro.org>,
"open list" <linux-kernel@vger.kernel.org>,
lkft-triage@lists.linaro.org,
"Linux Regressions" <regressions@lists.linux.dev>,
"Dan Carpenter" <dan.carpenter@linaro.org>,
"Anders Roxell" <anders.roxell@linaro.org>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>
Subject: Re: next-20240712: task_work.c:(.text+0xc2): undefined reference to `irq_work_queue'
Date: Fri, 12 Jul 2024 16:11:54 +0200 [thread overview]
Message-ID: <6494316f-fcf9-4c19-9f3c-f8ad6f0810fa@app.fastmail.com> (raw)
In-Reply-To: <20240712132427.GJ27299@noisy.programming.kicks-ass.net>
On Fri, Jul 12, 2024, at 15:24, Peter Zijlstra wrote:
> On Fri, Jul 12, 2024 at 02:28:38PM +0200, Arnd Bergmann wrote:
>> On Fri, Jul 12, 2024, at 14:13, Naresh Kamboju wrote:
>
>> that we may have to always enable IRQ_WORK even on non-SMP
>> kernels now. In practice it is already enabled in most
>> configurations for one reason or another, the the cost is
>> likely very small.
>>
>> Otherwise checking for CONFIG_HAVE_NMI in the new code might work.
>
> ARM seems to have HAVE_NMI while also being one of the architectures
> that is now failing.
Right, in this case we would also need
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -236,6 +236,7 @@ config HAVE_FUNCTION_ERROR_INJECTION
config HAVE_NMI
bool
+ select IRQ_WORK
config HAVE_FUNCTION_DESCRIPTORS
bool
> I'm a bit confused though, perf is already depending on irq_work (and
> perf is the user of TWA_NMI_CURRENT). So I'm not exactly sure what
> config fail is leading to all this.
Ok, this is the bit I was missing. If it's only needed for
perf, then the problem is that the caller is built in unconditionally
even when perf is disabled, otherwise it would be caught by
the existing:
config PERF_EVENTS
bool "Kernel performance events and counters"
select IRQ_WORK
> I suppose we can do something like the below.. it'll end up in a runtime
> fail for whoever manages to use TWA_NMI_CURRENT without also having
> irq_work enabled, but that should currently be nobody.
> break;
> +#ifdef CONFIG_IRQ_WORK
> case TWA_NMI_CURRENT:
> irq_work_queue(this_cpu_ptr(&irq_work_NMI_resume));
> break;
> +#endif
> default:
This looks more fragile than necessary. as it might fail if anything
else starts using TWA_NMI_CURRENT without selecting IRQ_WORK.
I would prefer either something that makes it still run into
a compile-time error (e.g. hiding the TWA_NMI_CURRENT inside
the same #ifdef), or just making IRQ_WORK unconditional
as I first suggested.
Configurations without IRQ_WORK are extremely rare, since
it also gets selected by CONFIG_PRINTK, which can only be
turned off for CONFIG_EXPERT=y and is almost always a good
idea even for small kernels.
Arnd
next prev parent reply other threads:[~2024-07-12 14:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 12:13 Naresh Kamboju
2024-07-12 12:28 ` Arnd Bergmann
2024-07-12 13:24 ` Peter Zijlstra
2024-07-12 14:11 ` Arnd Bergmann [this message]
2024-07-12 15:03 ` Peter Zijlstra
2024-07-18 16:25 ` Nathan Chancellor
2024-07-19 14:17 ` Guenter Roeck
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=6494316f-fcf9-4c19-9f3c-f8ad6f0810fa@app.fastmail.com \
--to=arnd@arndb.de \
--cc=anders.roxell@linaro.org \
--cc=bigeasy@linutronix.de \
--cc=dan.carpenter@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkft-triage@lists.linaro.org \
--cc=naresh.kamboju@linaro.org \
--cc=peterz@infradead.org \
--cc=regressions@lists.linux.dev \
/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®