Re: [PATCH 0/2] memblock tests: fix BUILD=32 address conversions

From: Tianyi Chen

Date: Tue Sep 22 2026 - 22:33:56 EST


Hi Mike,

> Does it mean BUILD=32 without NUMA does not pass with clang?

No. I reran v1 with Clang 18.1.3 and BUILD=32 without NUMA: all 189
checks pass. The previous cover letter only mentioned the NUMA-enabled
configuration tested then. Sorry for the ambiguity.

> I see a lot of warnings with gcc and BUILD=32. Do you mind fixing them
> as well?

Done in v2. I reproduced them with GCC 13.3.0 and removed the remaining
physical-address-to-pointer casts, used __pa() in tools virt_to_phys(),
and initialized end_rgn to address the maybe-uninitialized warning.
The latter is a false positive; each insertion already sets the index.

The virt_to_phys() cast also sign-extended 0x80000000 to
0xffffffff80000000 with GCC BUILD=32. A separate boundary check now
passes with both compilers in 32- and 64-bit builds.

GCC and Clang each pass seven configurations with -Werror and the default
ASan/UBSan flags, including BUILD=32 with and without NUMA. Details are
in the v2 cover letter, sent as a new thread:
https://lore.kernel.org/r/20260923023126.1910311-1-hi@xxxxxxxxx

Thanks,
Tianyi