public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] bootconfig: break dependency from memblock
@ 2026-04-15 10:51 Breno Leitao
  2026-04-15 10:51 ` [PATCH 1/3] bootconfig: use static buffers instead of memblock allocation Breno Leitao
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Breno Leitao @ 2026-04-15 10:51 UTC (permalink / raw)
  To: Andrew Morton, Masami Hiramatsu
  Cc: oss, paulmck, linux-trace-kernel, linux-kernel,
	linux-trace-kernel, kernel-team, Breno Leitao

This series moves embedded bootconfig (CONFIG_BOOT_CONFIG_EMBED) parsing
before setup_arch() in start_kernel(). The goal is to prepare for a
follow-up change that will allow bootconfig to provide early_param()
parameters (e.g. memblock=debug, loglevel) that are consumed during
architecture-specific setup.

Currently, bootconfig depends on memblock for memory allocation, which
is not available until setup_arch() initializes it. This series removes
that dependency by replacing memblock allocations with static __initdata
buffers (~96KB total, freed after init), then splits the bootconfig
loading into an early embedded path and a late initrd path.

The static buffers are used by both the kernel and the userspace
tools/bootconfig parser, which simplifies the code by removing the

These patches alone do not change user-visible behavior. Bootconfig
parameters are still stored in extra_command_line, which gets merged
into boot_command_line by setup_command_line() after setup_arch().

Making parse_early_param() see bootconfig values during setup_arch()
is a separate change that will follow once this infrastructure is
accepted.

Keeping the two efforts separate simplifies review, since the
early_param() integration is a non-trivial change on its own.

Some discussion that led to this decision:

1) It is not trivial to parse early param after setup_arch()
https://lore.kernel.org/all/20260325-early_bootconfig-v2-1-6b05a36fbfb5@debian.org/

2) An similar proposal from Petr 3 years ago:
https://lore.kernel.org/all/20231121231342.193646-2-oss@malat.biz/

---
Breno Leitao (3):
      bootconfig: use static buffers instead of memblock allocation
      init: use static buffers for bootconfig extra command line
      init: move embedded bootconfig parsing before setup_arch()

 init/main.c      | 91 +++++++++++++++++++++++++++++++++++++++++---------------
 lib/bootconfig.c | 56 +++++++---------------------------
 2 files changed, 77 insertions(+), 70 deletions(-)
---
base-commit: 1c7cc4904160c6fc6377564140062d68a3dc93a0
change-id: 20260414-bootconfig_earlier-9e185ceb71ae

Best regards,
--  
Breno Leitao <leitao@debian.org>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-04-17 15:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-15 10:51 [PATCH 0/3] bootconfig: break dependency from memblock Breno Leitao
2026-04-15 10:51 ` [PATCH 1/3] bootconfig: use static buffers instead of memblock allocation Breno Leitao
2026-04-15 10:51 ` [PATCH 2/3] init: use static buffers for bootconfig extra command line Breno Leitao
2026-04-17  1:44   ` Masami Hiramatsu
2026-04-17 15:38     ` Breno Leitao
2026-04-15 10:51 ` [PATCH 3/3] init: move embedded bootconfig parsing before setup_arch() Breno Leitao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox