[PATCH 0/2] init, hugetlb: fix early parameter ordering

From: Mike Rapoport

Date: Thu Sep 17 2026 - 03:44:21 EST


Hi,

On 2026-09-17 14:55 +0800, Zhenghui Hao wrote:
> hugetlb records its command line parameters from early_param()
> handlers and consumes them later from hugetlb_bootmem_alloc().
>
> Commit d49004c5f0c1 ("arch, mm: consolidate initialization of nodes,
> zones and memory map") moved that consumer into mm_core_init_early(),
> which runs before the generic parse_early_param() call in
> start_kernel(). Architectures that call parse_early_param() from
> setup_arch() are not affected, but on parisc the parameters are then
> recorded after they have already been consumed and are silently
> dropped.

Since parisc is one of very few architectures that does not call
parse_early_param() from setup_arch(), I think an easier fix would be
local to parisc.

And there is another related question more to parisc maintainers: do we
really need hugetlb on parisc these days?

> Patch 1/2 moves parse_early_param() before mm_core_init_early(),
> together with jump_label_init() and static_call_init() so that the
> "parameters may set static keys" guarantee still holds.
>
> Patch 2/2 makes this class of ordering problem non-silent. It cannot
> fire once 1/2 is applied; if you would rather take only the fix,
> please drop 2/2.
>
> Not tested on parisc hardware.
>
> Zhenghui Hao (2):
> init: parse early parameters before memory initialization
> hugetlb: report cmdline parameters recorded too late
>
> init/main.c | 8 ++++----
> mm/hugetlb.c | 14 ++++++++++++++
> 2 files changed, 18 insertions(+), 4 deletions(-)
>
>
> base-commit: 9b87fdc9af2fbfcdb5c24a64139685ef80f6573f
> --
> 2.53.0
>
>