summaryrefslogtreecommitdiff
path: root/include/linux/workqueue.h
diff options
context:
space:
mode:
authorBreno Leitao <leitao@debian.org>2026-07-02 21:15:45 +0900
committerMasami Hiramatsu (Google) <mhiramat@kernel.org>2026-07-02 21:15:45 +0900
commit462afde2150fface1122120af233e0be88e06814 (patch)
tree63e7f06893489f8685725accd9f0c1fc78075ef6 /include/linux/workqueue.h
parent1bbab483d30013e1a393dde547ff10fc4438b208 (diff)
bootconfig: add xbc_prepend_embedded_cmdline() helper
Add a helper that prepends the build-time-rendered embedded bootconfig "kernel" subtree (embedded_kernel_cmdline[] from embedded-cmdline.S) to a cmdline buffer with a separating space. Architectures call this from setup_arch() before parse_early_param() so early_param() handlers (mem=, earlycon=, loglevel=, ...) see values supplied via the embedded bootconfig. The in-place prepend (shift the existing string right, then drop the embedded string in front) is factored into a small str_prepend() helper. On overflow the helper logs an error and leaves the cmdline untouched rather than panicking. Booting without the embedded values is better than refusing to boot, and the error tells the user why their embedded keys are missing. The helper records whether it actually prepended, exposed via xbc_embedded_cmdline_applied(). setup_boot_config() uses this to decide whether the runtime "kernel" render would duplicate keys already folded into boot_command_line. Also add bootconfig_cmdline_requested(), a small parse_args() wrapper that reports whether "bootconfig" was passed on the command line and, via an optional out-parameter, where the "--" init arguments begin. setup_arch() and setup_boot_config() share it so the early and late paths agree on the opt-in. It sits under CONFIG_BOOT_CONFIG rather than CONFIG_CMDLINE_FROM_BOOTCONFIG because the runtime parser needs it on every bootconfig build. When CONFIG_CMDLINE_FROM_BOOTCONFIG=n, the public declaration in <linux/bootconfig.h> resolves to a no-op stub so callers compile unchanged. Link: https://lore.kernel.org/all/20260626-bootconfig_using_tools-v7-5-24ab72139c29@debian.org/ Signed-off-by: Breno Leitao <leitao@debian.org> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions