Re: [PATCH] soc: loongson: Make Loongson-2 drivers depend on MACH_LOONGSON64

From: Arnd Bergmann

Date: Mon Oct 19 2026 - 03:33:34 EST


On Mon, Oct 19, 2026, at 05:14, Huacai Chen wrote:
> Loongson-2 is 64bit CPU series, their SoC drviers are not supposed to be
> used with 32bit. So make Loongson-2 drivers depend on MACH_LOONGSON64 to
> avoid build warnings:
>
> drivers/soc/loongson/loongson2_pm.c: In function 'loongson2_pm_probe':
>>> drivers/soc/loongson/loongson2_pm.c:178:49: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> 178 | loongson_sysconf.suspend_addr =
> (u64)phys_to_virt(suspend_addr);
> |
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: 3d9aba6618d1 ("LoongArch: Adjust build infrastructure for
> 32BIT/64BIT")

I would prefer just fixing the trivial portability issue here and keep
the COMPILE_TEST option around. loongson_sysconf.suspend_addr is
'unsigned long', so just cast to that instead of u64, or
change the suspend_addr type to 'void *'.

Arnd