[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251031161708.312343f8@pumpkin>
Date: Fri, 31 Oct 2025 16:17:08 +0000
From: David Laight <david.laight.linux@...il.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>, linux-kernel@...r.kernel.org,
u.kleine-koenig@...libre.com, Nicolas Pitre <npitre@...libre.com>, Peter
Zijlstra <peterz@...radead.org>, Biju Das <biju.das.jz@...renesas.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>, Ingo Molnar <mingo@...hat.com>, Thomas
Gleixner <tglx@...utronix.de>, Li RongQing <lirongqing@...du.com>, Yu Kuai
<yukuai3@...wei.com>, Khazhismel Kumykov <khazhy@...omium.org>, Jens Axboe
<axboe@...nel.dk>, x86@...nel.org
Subject: Re: [PATCH v4 next 0/9] Implement mul_u64_u64_div_u64_roundup()
On Fri, 31 Oct 2025 14:52:56 +0100
Oleg Nesterov <oleg@...hat.com> wrote:
> On 10/29, David Laight wrote:
> >
> > The pwm-stm32.c code wants a 'rounding up' version of mul_u64_u64_div_u64().
> > This can be done simply by adding 'divisor - 1' to the 128bit product.
> > Implement mul_u64_add_u64_div_u64(a, b, c, d) = (a * b + c)/d based on the
> > existing code.
> > Define mul_u64_u64_div_u64(a, b, d) as mul_u64_add_u64_div_u64(a, b, 0, d) and
> > mul_u64_u64_div_u64_roundup(a, b, d) as mul_u64_add_u64_div_u64(a, b, d-1, d).
>
> Sorry for the noise. Can't review due to the lack of knowledge.
> But this reminds me... What about
>
> [PATCH v3 1/2] x86/math64: handle #DE in mul_u64_u64_div_u64()
> https://lore.kernel.org/all/20250815164055.GA13444@redhat.com
>
> ?
>
> should I resend it once again or we don't care?
I'd remembered that as well.
I'll do a new version of that on top as a separate patch.
Probably when this set has been merged further.
David
Powered by blists - more mailing lists