]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
efi: Allow to expose the workqueue via sysfs
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Fri, 27 Feb 2026 17:01:03 +0000 (18:01 +0100)
committerTejun Heo <tj@kernel.org>
Fri, 27 Feb 2026 18:21:37 +0000 (08:21 -1000)
Exposing the efi_rts_wq workqueue via sysfs provides an easy mechanism
to restrict EFI firmware invocation to certain CPU(s).
This can be used to restrict EFI invocations to specific CPUs while
allowing other workqueue to use the remaning CPUs.

Expose the workqueue via sysfs. Change the name to efi_runtime which is
what will be visible under sysfs.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
drivers/firmware/efi/efi.c

index b2fb92a4bbd119ea2a8879f536bc36e946511775..3dab284a7754dfd7a241e442c7f96f0e40062c1b 100644 (file)
@@ -423,7 +423,7 @@ static int __init efisubsys_init(void)
                 * ordered workqueue (which creates only one execution context)
                 * should suffice for all our needs.
                 */
-               efi_rts_wq = alloc_ordered_workqueue("efi_rts_wq", 0);
+               efi_rts_wq = alloc_ordered_workqueue("efi_runtime", WQ_SYSFS);
                if (!efi_rts_wq) {
                        pr_err("Creating efi_rts_wq failed, EFI runtime services disabled.\n");
                        clear_bit(EFI_RUNTIME_SERVICES, &efi.flags);