lkml.org 
[lkml]   [2024]   [Apr]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] clk: sophgo: avoid open-coded 64-bit division
On Tue, Apr 16, 2024 at 06:30:42AM GMT, Inochi Amaoto wrote:
> On Mon, Apr 15, 2024 at 03:45:20PM +0200, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > On 32-bit architectures, the 64-bit division leads to a link failure:
> >
> > arm-linux-gnueabi-ld: drivers/clk/sophgo/clk-cv18xx-pll.o: in function `fpll_calc_rate':
> > clk-cv18xx-pll.c:(.text.fpll_calc_rate+0x26): undefined reference to `__aeabi_uldivmod'
> >
> > This one is not called in a fast path, and there is already another div_u64()
> > variant used in the same function, so convert it to div64_u64_rem().
> >
> > Fixes: 80fd61ec4612 ("clk: sophgo: Add clock support for CV1800 SoC")
> > Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> There is already a fix patch:
> https://lore.kernel.org/all/IA1PR20MB4953CB4FCCDE82AB25F6880EBB0B2@IA1PR20MB4953.namprd20.prod.outlook.com/

Hi Arnd,

I have looked your patch again and think your patch is better
than mine. So I decided to drop my patch and favor yours.

LGTM. And there are some necessary tags.

Reviewed-by: Inochi Amaoto <inochiama@outlook.com>
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202404122344.d5pb2N1I-lkp@intel.com/
Closes: https://lore.kernel.org/oe-kbuild-all/202404140310.QEjZKtTN-lkp@intel.com/

\
 
 \ /
  Last update: 2024-04-17 13:12    [W:0.039 / U:1.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site