* [PATCH v1] pwm: th1520: Fix 32-bit build with COMPILE_TEST
@ 2026-09-29 9:56 ` FUJITA Tomonori
2026-09-29 10:24 ` Andreas Hindborg
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: FUJITA Tomonori @ 2026-09-29 9:56 UTC (permalink / raw)
To: ojeda, fustini, guoren, wefu
Cc: a.hindborg, acourbot, aliceryhl, bjorn3_gh, boqun, dakr,
daniel.almeida, gary, lossin, tamird, tmgross, work,
rust-for-linux, linux-riscv, FUJITA Tomonori
From: FUJITA Tomonori <fujita.tomonori@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@gmail.com>
---
drivers/pwm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig
index 729776086879..abecd95b0c3c 100644
--- a/drivers/pwm/Kconfig
+++ b/drivers/pwm/Kconfig
@@ -772,7 +772,7 @@ config PWM_TEGRA
config PWM_TH1520
tristate "TH1520 PWM support"
- depends on ARCH_THEAD || COMPILE_TEST
+ depends on ARCH_THEAD || (COMPILE_TEST && 64BIT)
depends on RUST
depends on HAS_IOMEM && COMMON_CLK
select RUST_PWM_ABSTRACTIONS
base-commit: d266640c6c760c9bc215bf5a3ece122ca488b6f5
--
2.43.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1] pwm: th1520: Fix 32-bit build with COMPILE_TEST
2026-09-29 9:56 ` [PATCH v1] pwm: th1520: Fix 32-bit build with COMPILE_TEST FUJITA Tomonori
@ 2026-09-29 10:24 ` Andreas Hindborg
2026-09-29 11:17 ` Gary Guo
2026-09-29 11:54 ` Miguel Ojeda
2 siblings, 0 replies; 5+ messages in thread
From: Andreas Hindborg @ 2026-09-29 10:24 UTC (permalink / raw)
To: FUJITA Tomonori, ojeda, fustini, guoren, wefu
Cc: acourbot, aliceryhl, bjorn3_gh, boqun, dakr, daniel.almeida, gary,
lossin, tamird, tmgross, work, rust-for-linux, linux-riscv,
FUJITA Tomonori
"FUJITA Tomonori" <tomo@flapping.org> writes:
> From: FUJITA Tomonori <fujita.tomonori@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@gmail.com>
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Best regards,
Andreas Hindborg
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] pwm: th1520: Fix 32-bit build with COMPILE_TEST
2026-09-29 9:56 ` [PATCH v1] pwm: th1520: Fix 32-bit build with COMPILE_TEST FUJITA Tomonori
2026-09-29 10:24 ` Andreas Hindborg
@ 2026-09-29 11:17 ` Gary Guo
2026-09-29 11:54 ` Miguel Ojeda
2 siblings, 0 replies; 5+ messages in thread
From: Gary Guo @ 2026-09-29 11:17 UTC (permalink / raw)
To: FUJITA Tomonori, ojeda, fustini, guoren, wefu
Cc: a.hindborg, acourbot, aliceryhl, bjorn3_gh, boqun, dakr,
daniel.almeida, gary, lossin, tamird, tmgross, work,
rust-for-linux, linux-riscv, FUJITA Tomonori
On Tue Sep 29, 2026 at 10:56 AM BST, FUJITA Tomonori wrote:
> From: FUJITA Tomonori <fujita.tomonori@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@gmail.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
> ---
> drivers/pwm/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] pwm: th1520: Fix 32-bit build with COMPILE_TEST
2026-09-29 9:56 ` [PATCH v1] pwm: th1520: Fix 32-bit build with COMPILE_TEST FUJITA Tomonori
2026-09-29 10:24 ` Andreas Hindborg
2026-09-29 11:17 ` Gary Guo
@ 2026-09-29 11:54 ` Miguel Ojeda
2026-09-29 12:16 ` FUJITA Tomonori
2 siblings, 1 reply; 5+ messages in thread
From: Miguel Ojeda @ 2026-09-29 11:54 UTC (permalink / raw)
To: FUJITA Tomonori
Cc: ojeda, fustini, guoren, wefu, a.hindborg, acourbot, aliceryhl,
bjorn3_gh, boqun, dakr, daniel.almeida, gary, lossin, tamird,
tmgross, work, rust-for-linux, linux-riscv, FUJITA Tomonori
On Tue, Sep 29, 2026 at 11:56 AM FUJITA Tomonori <tomo@flapping.org> wrote:
>
> he TH1520 is a 64-bit RISC-V SoC, so the driver is only used on
Cut word at the beginning.
> Fixes: 3c180003dffb ("pwm: th1520: Fix missing Kconfig dependencies")
Should this have Cc: stable@vger.kernel.org?
Thanks!
Cheers,
Miguel
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1] pwm: th1520: Fix 32-bit build with COMPILE_TEST
2026-09-29 11:54 ` Miguel Ojeda
@ 2026-09-29 12:16 ` FUJITA Tomonori
0 siblings, 0 replies; 5+ messages in thread
From: FUJITA Tomonori @ 2026-09-29 12:16 UTC (permalink / raw)
To: miguel.ojeda.sandonis
Cc: tomo, ojeda, fustini, guoren, wefu, a.hindborg, acourbot,
aliceryhl, bjorn3_gh, boqun, dakr, daniel.almeida, gary, lossin,
tamird, tmgross, work, rust-for-linux, linux-riscv, ukleinek,
m.wilczynski, linux-pwm
On Tue, 29 Sep 2026 13:54:05 +0200
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> wrote:
> On Tue, Sep 29, 2026 at 11:56 AM FUJITA Tomonori <tomo@flapping.org> wrote:
>>
>> he TH1520 is a 64-bit RISC-V SoC, so the driver is only used on
>
> Cut word at the beginning.
Oops, thanks.
>> Fixes: 3c180003dffb ("pwm: th1520: Fix missing Kconfig dependencies")
>
> Should this have Cc: stable@vger.kernel.org?
Yes, I'll add Cc: stable. The build error has been there since v6.19.
I also forgot to Cc the PWM maintainer and list, and missed the
Reported-by and Closes tags. I'll send v2 tomorrow with these fixes
and the Reviewed-by tags from Andreas and Gary.
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-29 12:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <8Hw8rFOzHELmQvD7ZIatk1FJqh39-AbzNppa9asPFp0Cp9gFzcQ7zs_34jnuQGt5ukgNPqz0yxdaIyT2SHtACA==@protonmail.internalid>
2026-09-29 9:56 ` [PATCH v1] pwm: th1520: Fix 32-bit build with COMPILE_TEST FUJITA Tomonori
2026-09-29 10:24 ` Andreas Hindborg
2026-09-29 11:17 ` Gary Guo
2026-09-29 11:54 ` Miguel Ojeda
2026-09-29 12:16 ` FUJITA Tomonori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox