[PATCH] ARM: set MAX_PHYSMEM_BITS to 32 for !LPAE

Arnd Bergmann arnd at arndb.de
Fri Jul 24 00:23:45 PDT 2026


On Fri, Jul 24, 2026, at 08:30, Karl Mehltretter wrote:
> The default MAX_PHYSMEM_BITS of 36 was introduced for LPAE platforms,
> but also applies to non-LPAE ARM, which has 32-bit physical addresses.
> With GET_FREE_REGION and CONFIG_WERROR, this causes:
>
>   error: conversion from 'long long unsigned int' to 'resource_size_t'
>   changes value from '68719476735' to '4294967295'
>
> Use a 36-bit default only for LPAE builds.
>
> Fixes: db57f88e4ccb ("ARM: 8411/1: Add default SPARSEMEM settings")
> Assisted-by: Claude:claude-fable-5

When we added the 36 bit limit, that was specifically to account
for CONFIG_IO_36 on XSC3 cores, see commit 23bdf86aa06e ("[ARM]
3377/2: add support for intel xsc3 core") and the thread around

https://lore.kernel.org/all/CAK8P3a2MCdUbN0QSb+M3g5_6HjPsaQwtKxFjADMZWomdry4-Ww@mail.gmail.com/

It's probably safe to assume that none of this is used in
practice, as only PXA3xx has this CPU core now that IXP23xx and IOP
are gone, and PXA does not use the high addressing. Similarly, we
never had any platform attempt to use IO_36 on ARMv6 or ARMv7-A.

Can you update the patch to also remove CONFIG_IO_36 and explain
the dependency?

     Arnd



More information about the linux-arm-kernel mailing list