[PATCH v1] pwm: th1520: Fix 32-bit build with COMPILE_TEST

Gary Guo gary at garyguo.net
Tue Sep 29 04:17:48 PDT 2026


On Tue Sep 29, 2026 at 10:56 AM BST, FUJITA Tomonori wrote:
> From: FUJITA Tomonori <fujita.tomonori at gmail.com>
> 
> Fix the following build error on 32-bit ARM with COMPILE_TEST:
> 
>   ERROR: modpost: drivers/pwm/pwm_th1520.ko: symbol '__aeabi_uldivmod' undefined!
> 
> The driver divides u64 values when it converts between nanoseconds and
> clock cycles. On 32-bit ARM, these divisions are compiled to calls to
> __aeabi_uldivmod, which the kernel does not provide.
> 
> he TH1520 is a 64-bit RISC-V SoC, so the driver is only used on
> 64-bit kernels. There is no point in compile testing it on 32-bit.
> Limit COMPILE_TEST to 64BIT instead of changing the arithmetic to use
> the div64 helpers.
> 
> Fixes: 3c180003dffb ("pwm: th1520: Fix missing Kconfig dependencies")
> Signed-off-by: FUJITA Tomonori <fujita.tomonori at gmail.com>

Reviewed-by: Gary Guo <gary at garyguo.net>

> ---
>  drivers/pwm/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)




More information about the linux-riscv mailing list