Re: [PATCH 17/24] alpha: select ARCH_USE_MEMTEST

From: Magnus Lindholm

Date: Wed Sep 02 2026 - 18:00:14 EST


On Tue, Sep 1, 2026 at 5:51 PM Matt Turner <mattst88@xxxxxxxxx> wrote:
>
> Wire up the generic early memtest from arch_mm_preinit(), which runs
> after parse_early_param() has picked up the memtest= command line option
> and before memblock_free_all() hands the memory to the buddy allocator.
> paging_init() would be the natural place, but Alpha calls it from
> setup_arch(), before the option is parsed, so the test would never run.
>
> The test range starts at the first DRAM address rather than physical zero
> because low memory on Alpha is owned by the console and PALcode.
>
> Tested under QEMU with memtest=4: all four patterns pass over the free
> memblock ranges, with no bad memory reserved.
>
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: Matt Turner <mattst88@xxxxxxxxx>


I tested this on an Alpha UP2000 with CONFIG_MEMTEST=y and memtest=4.
The early memory test completed successfully and reported:

EarlyMemtestBad: 0 kB

It would also be useful to add ALPHA to the memtest= architecture list
in Documentation/admin-guide/kernel-parameters.txt.

Tested-by: Magnus Lindholm <linmag7@xxxxxxxxx>
Reviewed-by: Magnus Lindholm <linmag7@xxxxxxxxx>