Re: [PATCH] can: rockchip_canfd: avoids 64-bit division

From: Marc Kleine-Budde
Date: Mon Sep 09 2024 - 05:47:11 EST


On 09.09.2024 11:21:04, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> The new driver fails to build on some 32-bit configurations:
>
> arm-linux-gnueabi-ld: drivers/net/can/rockchip/rockchip_canfd-timestamp.o: in function `rkcanfd_timestamp_init':
> rockchip_canfd-timestamp.c:(.text+0x14a): undefined reference to `__aeabi_ldivmod'
>
> Rework the delay calculation to only require a single 64-bit
> division.
>
> Fixes: 4e1a18bab124 ("can: rockchip_canfd: add hardware timestamping support")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

I've already send a PR which replaces the division by div_u64(), so not
as elaborate as yours:

| https://lore.kernel.org/all/20240909-can-rockchip_canfd-fix-64-bit-division-v1-1-2748d9422b00@xxxxxxxxxxxxxx/

I'll port your patch on top of mine and include it in my next PR.

regards,
Marc

--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung Nürnberg | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |

Attachment: signature.asc
Description: PGP signature