summaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2024-02-16 08:10:01 +0300
committerTejun Heo <tj@kernel.org>2024-02-16 19:33:43 +0300
commitfd0a68a2337b79a7bd4dad5e7d9dc726828527af (patch)
treea0299d8a368233758daf7e786158a9ea1fb1d7f2 /init
parent2f34d7337d98f3eae7bd3d1270efaf9d8a17cfc6 (diff)
downloadlinux-fd0a68a2337b79a7bd4dad5e7d9dc726828527af.tar.xz
workqueue, irq_work: Build fix for !CONFIG_IRQ_WORK
2f34d7337d98 ("workqueue: Fix queue_work_on() with BH workqueues") added irq_work usage to workqueue; however, it turns out irq_work is actually optional and the change breaks build on configuration which doesn't have CONFIG_IRQ_WORK enabled. Fix build by making workqueue use irq_work only when CONFIG_SMP and enabling CONFIG_IRQ_WORK when CONFIG_SMP is set. It's reasonable to argue that it may be better to just always enable it. However, this still saves a small bit of memory for tiny UP configs and also the least amount of change, so, for now, let's keep it conditional. Verified to do the right thing for x86_64 allnoconfig and defconfig, and aarch64 allnoconfig, allnoconfig + prink disable (SMP but nothing selects IRQ_WORK) and a modified aarch64 Kconfig where !SMP and nothing selects IRQ_WORK. v2: `depends on SMP` leads to Kconfig warnings when CONFIG_IRQ_WORK is selected by something else when !CONFIG_SMP. Use `def_bool y if SMP` instead. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org> Tested-by: Anders Roxell <anders.roxell@linaro.org> Fixes: 2f34d7337d98 ("workqueue: Fix queue_work_on() with BH workqueues") Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'init')
-rw-r--r--init/Kconfig2
1 files changed, 1 insertions, 1 deletions
diff --git a/init/Kconfig b/init/Kconfig
index 8df18f3a9748..0d21c9e0398f 100644
--- a/init/Kconfig
+++ b/init/Kconfig
@@ -106,7 +106,7 @@ config CONSTRUCTORS
bool
config IRQ_WORK
- bool
+ def_bool y if SMP
config BUILDTIME_TABLE_SORT
bool