* next-20240215: workqueue.c: undefined reference to `irq_work_queue_on'
@ 2024-02-15 10:11 Naresh Kamboju
2024-02-15 11:03 ` Naresh Kamboju
2024-02-15 13:40 ` Tejun Heo
0 siblings, 2 replies; 4+ messages in thread
From: Naresh Kamboju @ 2024-02-15 10:11 UTC (permalink / raw)
To: open list, Linux-Next Mailing List, lkft-triage,
Linux Regressions
Cc: Tejun Heo, Lai Jiangshan, Anders Roxell
On today's Linux next-20240215 tinyconfig builds failed on arm, arm64, powerpc,
s390 and riscv with gcc-13 and clang.
Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
build error:
-------
aarch64-linux-gnu-ld: kernel/workqueue.o: in function `kick_pool':
workqueue.c:(.text+0x9e4): undefined reference to `irq_work_queue_on'
workqueue.c:(.text+0x9e4): relocation truncated to fit:
R_AARCH64_CALL26 against undefined symbol `irq_work_queue_on'
Links:
- https://storage.tuxsuite.com/public/linaro/lkft/builds/2cO8iztCdxtnbSeW3ekjN25sY6G/
--
Linaro LKFT
https://lkft.linaro.org
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: next-20240215: workqueue.c: undefined reference to `irq_work_queue_on'
2024-02-15 10:11 next-20240215: workqueue.c: undefined reference to `irq_work_queue_on' Naresh Kamboju
@ 2024-02-15 11:03 ` Naresh Kamboju
2024-02-15 13:40 ` Tejun Heo
1 sibling, 0 replies; 4+ messages in thread
From: Naresh Kamboju @ 2024-02-15 11:03 UTC (permalink / raw)
To: open list, Linux-Next Mailing List, lkft-triage,
Linux Regressions
Cc: Tejun Heo, Lai Jiangshan, Anders Roxell
On Thu, 15 Feb 2024 at 15:41, Naresh Kamboju <naresh.kamboju@linaro.org> wrote:
>
> On today's Linux next-20240215 tinyconfig builds failed on arm, arm64, powerpc,
> s390 and riscv with gcc-13 and clang.
>
> Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
>
> build error:
> -------
> aarch64-linux-gnu-ld: kernel/workqueue.o: in function `kick_pool':
> workqueue.c:(.text+0x9e4): undefined reference to `irq_work_queue_on'
> workqueue.c:(.text+0x9e4): relocation truncated to fit:
> R_AARCH64_CALL26 against undefined symbol `irq_work_queue_on'
Anders bisect this build regression and found first bad commit,
# first bad commit: [3bc1e711c26bff01d41ad71145ecb8dcb4412576]
workqueue: Don't implicitly make UNBOUND workqueues w/ @max_active==1
ordered
- Naresh
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: next-20240215: workqueue.c: undefined reference to `irq_work_queue_on'
2024-02-15 10:11 next-20240215: workqueue.c: undefined reference to `irq_work_queue_on' Naresh Kamboju
2024-02-15 11:03 ` Naresh Kamboju
@ 2024-02-15 13:40 ` Tejun Heo
2024-02-15 15:18 ` Anders Roxell
1 sibling, 1 reply; 4+ messages in thread
From: Tejun Heo @ 2024-02-15 13:40 UTC (permalink / raw)
To: Naresh Kamboju
Cc: open list, Linux-Next Mailing List, lkft-triage,
Linux Regressions, Lai Jiangshan, Anders Roxell
Hello,
Can you see whether the following patch fixes the build?
diff --git a/init/Kconfig b/init/Kconfig
index 8df18f3a9748..41be05a8ba5e 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -107,6 +107,8 @@ config CONSTRUCTORS
config IRQ_WORK
bool
+ depends on SMP
+ default y
config BUILDTIME_TABLE_SORT
bool
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 04e35dbe6799..6ae441e13804 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1209,6 +1209,20 @@ static struct irq_work *bh_pool_irq_work(struct worker_pool *pool)
return &per_cpu(bh_pool_irq_works, pool->cpu)[high];
}
+static void kick_bh_pool(struct worker_pool *pool)
+{
+#ifdef CONFIG_SMP
+ if (unlikely(pool->cpu != smp_processor_id())) {
+ irq_work_queue_on(bh_pool_irq_work(pool), pool->cpu);
+ return;
+ }
+#endif
+ if (pool->attrs->nice == HIGHPRI_NICE_LEVEL)
+ raise_softirq_irqoff(HI_SOFTIRQ);
+ else
+ raise_softirq_irqoff(TASKLET_SOFTIRQ);
+}
+
/**
* kick_pool - wake up an idle worker if necessary
* @pool: pool to kick
@@ -1227,15 +1241,7 @@ static bool kick_pool(struct worker_pool *pool)
return false;
if (pool->flags & POOL_BH) {
- if (likely(pool->cpu == smp_processor_id())) {
- if (pool->attrs->nice == HIGHPRI_NICE_LEVEL)
- raise_softirq_irqoff(HI_SOFTIRQ);
- else
- raise_softirq_irqoff(TASKLET_SOFTIRQ);
- } else {
- irq_work_queue_on(bh_pool_irq_work(pool), pool->cpu);
- }
-
+ kick_bh_pool(pool);
return true;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: next-20240215: workqueue.c: undefined reference to `irq_work_queue_on'
2024-02-15 13:40 ` Tejun Heo
@ 2024-02-15 15:18 ` Anders Roxell
0 siblings, 0 replies; 4+ messages in thread
From: Anders Roxell @ 2024-02-15 15:18 UTC (permalink / raw)
To: Tejun Heo
Cc: Naresh Kamboju, open list, Linux-Next Mailing List, lkft-triage,
Linux Regressions, Lai Jiangshan
On Thu, 15 Feb 2024 at 14:40, Tejun Heo <tj@kernel.org> wrote:
>
> Hello,
Hey Tejun,
>
> Can you see whether the following patch fixes the build?
This patch fixes the build. Thank you for the quick fix.
Tested-by: Anders Roxell <anders.roxell@linaro.org>
>
> diff --git a/init/Kconfig b/init/Kconfig
> index 8df18f3a9748..41be05a8ba5e 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -107,6 +107,8 @@ config CONSTRUCTORS
>
> config IRQ_WORK
> bool
> + depends on SMP
> + default y
>
> config BUILDTIME_TABLE_SORT
> bool
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index 04e35dbe6799..6ae441e13804 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -1209,6 +1209,20 @@ static struct irq_work *bh_pool_irq_work(struct worker_pool *pool)
> return &per_cpu(bh_pool_irq_works, pool->cpu)[high];
> }
>
> +static void kick_bh_pool(struct worker_pool *pool)
> +{
> +#ifdef CONFIG_SMP
> + if (unlikely(pool->cpu != smp_processor_id())) {
> + irq_work_queue_on(bh_pool_irq_work(pool), pool->cpu);
> + return;
> + }
> +#endif
> + if (pool->attrs->nice == HIGHPRI_NICE_LEVEL)
> + raise_softirq_irqoff(HI_SOFTIRQ);
> + else
> + raise_softirq_irqoff(TASKLET_SOFTIRQ);
> +}
> +
> /**
> * kick_pool - wake up an idle worker if necessary
> * @pool: pool to kick
> @@ -1227,15 +1241,7 @@ static bool kick_pool(struct worker_pool *pool)
> return false;
>
> if (pool->flags & POOL_BH) {
> - if (likely(pool->cpu == smp_processor_id())) {
> - if (pool->attrs->nice == HIGHPRI_NICE_LEVEL)
> - raise_softirq_irqoff(HI_SOFTIRQ);
> - else
> - raise_softirq_irqoff(TASKLET_SOFTIRQ);
> - } else {
> - irq_work_queue_on(bh_pool_irq_work(pool), pool->cpu);
> - }
> -
> + kick_bh_pool(pool);
> return true;
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-15 15:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-15 10:11 next-20240215: workqueue.c: undefined reference to `irq_work_queue_on' Naresh Kamboju
2024-02-15 11:03 ` Naresh Kamboju
2024-02-15 13:40 ` Tejun Heo
2024-02-15 15:18 ` Anders Roxell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox