On Thu, 30 Jul 2026 22:40:37 +0400, Alexey Charkov wrote:
> U-Boot's <linux/math64.h> was last really synced with Linux in 2017 by
> commit 0342e335ba88 ("lib: div64: sync with Linux"). Since then it has
> only been patched locally twice, and both times in ways that increased
> the divergence rather than tracking upstream.
>
> The one that prompted this series is DIV64_U64_ROUND_UP(). Commit
> 3adc17f60bf8 ("lib: div64: Add support for round up of div64_u64") added
> it inside the #if BITS_PER_LONG == 64 branch, whereas upstream defines
> it unconditionally after that block, so any 32-bit user fails to build.
>
> [...]
Applied to u-boot/next, thanks!
[1/5] lib: div64: fix off-by-one shift in div64_u64() and div64_u64_rem()
commit: 8e82c0a75f5df98df1b23d0898c4d7008ab64621
[2/5] lib: div64: use abs64() for the 64-bit operands of div64_s64()
commit: c81dbcc9cef01c31f7d6f3da07130cdf4f3ec63a
[3/5] lib: div64: inline __iter_div_u64_rem() into its only user
commit: 6228dd6d791c0f9eab56060a1eb404d4d174b525
[4/5] lib: div64: sync with Linux v7.1
commit: 378c10eab1a7224f00ee7d9b29748bb08c14d396
[5/5] lib: math64: sync <linux/math64.h> with Linux v7.1
commit: b7fd64c36d4c98e5259a9970d3382cad2a715f74
--
Tom