[U-Boot] [PATCH v2] ARM: Use do_div() instead of division for "long long".

Haavard Skinnemoen haavard.skinnemoen at atmel.com
Fri Sep 12 00:24:09 CEST 2008


On Tue,  9 Sep 2008 02:08:31 +0200
Wolfgang Denk <wd at denx.de> wrote:

> From: Sergei Poselenov <sposelenov at emcraft.com>
> 
> Signed-off-by: Sergei Poselenov <sposelenov at emcraft.com>
> Signed-off-by: Wolfgang Denk <wd at denx.de>
> ---
> 
> With some (more recent) compiler versions there are problems because
> of the use of "long long" divisions in the U-Boot code. For ARM, this
> requires the __udivdi3 GCC library function, which currently is not
> present in lib_arm. This function was present in older 2.6 kernels,
> but at some point it was removed from here, with suggestion to use
> do_div() instead. In U-boot, the do_div() function is available, too,
> so this patch generally does the replacement of the "long long"
> divisions to do_div() to avoid the aforementions issues.

Could you please move that nice explanation above the '---' line? I
think it's really useful to have the reason behind a particular change
in the commit history.

Haavard


More information about the U-Boot mailing list