From: Andreas Hindborg <a.hindborg@kernel.org>
To: "FUJITA Tomonori" <fujita.tomonori@gmail.com>
Cc: <rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<a.hindborg@samsung.com>, <boqun.feng@gmail.com>,
<frederic@kernel.org>, <lyude@redhat.com>, <tglx@linutronix.de>,
<anna-maria@linutronix.de>, <jstultz@google.com>,
<sboyd@kernel.org>, <ojeda@kernel.org>, <alex.gaynor@gmail.com>,
<gary@garyguo.net>, <bjorn3_gh@protonmail.com>,
<benno.lossin@proton.me>, <aliceryhl@google.com>,
<tmgross@umich.edu>, <chrisi.schrefl@gmail.com>,
<arnd@arndb.de>, <linux@armlinux.org.uk>
Subject: Re: [PATCH v1] rust: time: Avoid 64-bit integer division
Date: Mon, 05 May 2025 13:51:56 +0200 [thread overview]
Message-ID: <87tt5zwa03.fsf@kernel.org> (raw)
In-Reply-To: <20250505.201004.457132112950898883.fujita.tomonori@gmail.com> (FUJITA Tomonori's message of "Mon, 05 May 2025 20:10:04 +0900")
"FUJITA Tomonori" <fujita.tomonori@gmail.com> writes:
> On Mon, 05 May 2025 12:46:15 +0200
> Andreas Hindborg <a.hindborg@kernel.org> wrote:
>
>> FUJITA Tomonori <fujita.tomonori@gmail.com> writes:
>>
>>> Avoid 64-bit integer division that 32-bit architectures don't
>>> implement generally. This uses ktime_to_ms() and ktime_to_us()
>>> instead.
>>>
>>> The timer abstraction needs i64 / u32 division so C's div_s64() can be
>>> used but ktime_to_ms() and ktime_to_us() provide a simpler solution
>>> for this timer abstraction problem. On some architectures, there is
>>> room to optimize the implementation of them, but such optimization can
>>> be done if and when it becomes necessary.
>>>
>>> One downside of calling the C's functions is that the as_micros/millis
>>> methods can no longer be const fn. We stick with the simpler approach
>>> unless there's a compelling need for a const fn.
>>>
>>> Signed-off-by: FUJITA Tomonori <fujita.tomonori@gmail.com>
>>
>>
>> Please consult recent MAINTAINERS file when you send patches. If you
>> intend for me to see a patch, please use my registered email address.
>
> Sorry, I did follow that for the last two patchsets (generalizing
> Instant and hrtimer), but somehow I messed up with this one.
>
> Should I resend v2 of this fix to the correct email address?
>
> https://lore.kernel.org/lkml/20250502004524.230553-1-fujita.tomonori@gmail.com/
No I got it from list, so it's fine for this one. But please stop CC'ing
the the Samsung address.
Best regards,
Andreas Hindborg
prev parent reply other threads:[~2025-05-05 12:17 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-01 1:58 [PATCH v1] rust: time: Avoid 64-bit integer division FUJITA Tomonori
2025-05-01 2:45 ` FUJITA Tomonori
2025-05-01 9:24 ` Miguel Ojeda
2025-05-01 12:02 ` FUJITA Tomonori
2025-05-01 8:01 ` Christian Schrefl
2025-05-01 9:22 ` Miguel Ojeda
2025-05-01 12:26 ` Boqun Feng
2025-05-01 12:37 ` Boqun Feng
2025-05-01 13:48 ` FUJITA Tomonori
2025-05-01 14:06 ` Boqun Feng
2025-05-01 13:07 ` FUJITA Tomonori
2025-05-01 13:12 ` Boqun Feng
2025-05-01 13:20 ` Boqun Feng
2025-05-01 15:11 ` Arnd Bergmann
2025-05-01 23:03 ` Boqun Feng
2025-05-01 23:38 ` Christian Schrefl
2025-05-03 0:14 ` FUJITA Tomonori
2025-05-01 13:22 ` Miguel Ojeda
2025-05-01 13:25 ` Boqun Feng
2025-05-01 13:38 ` FUJITA Tomonori
2025-05-05 10:46 ` Andreas Hindborg
2025-05-05 11:10 ` FUJITA Tomonori
2025-05-05 11:51 ` Andreas Hindborg [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87tt5zwa03.fsf@kernel.org \
--to=a.hindborg@kernel.org \
--cc=a.hindborg@samsung.com \
--cc=alex.gaynor@gmail.com \
--cc=aliceryhl@google.com \
--cc=anna-maria@linutronix.de \
--cc=arnd@arndb.de \
--cc=benno.lossin@proton.me \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--cc=chrisi.schrefl@gmail.com \
--cc=frederic@kernel.org \
--cc=fujita.tomonori@gmail.com \
--cc=gary@garyguo.net \
--cc=jstultz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lyude@redhat.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=tglx@linutronix.de \
--cc=tmgross@umich.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).