[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250626170538.67e26afc@canb.auug.org.au>
Date: Thu, 26 Jun 2025 17:05:38 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Andreas Hindborg <a.hindborg@...nel.org>
Cc: "Danilo Krummrich" <dakr@...nel.org>, "Alexandre Courbot"
<acourbot@...dia.com>, "FUJITA Tomonori" <fujita.tomonori@...il.com>,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>, "Linux Next
Mailing List" <linux-next@...r.kernel.org>
Subject: Re: linux-next: manual merge of the rust-timekeeping tree with the
drm-nova tree
Hi all,
On Wed, 25 Jun 2025 16:13:01 +1000 Stephen Rothwell <sfr@...b.auug.org.au> wrote:
>
> On Tue, 24 Jun 2025 21:02:43 +0200 Andreas Hindborg <a.hindborg@...nel.org> wrote:
> >
> > diff --git a/drivers/gpu/nova-core/util.rs b/drivers/gpu/nova-core/util.rs
> > index 5cafe0797cd6..01a920085438 100644
> > --- a/drivers/gpu/nova-core/util.rs
> > +++ b/drivers/gpu/nova-core/util.rs
> > @@ -3,7 +3,7 @@
> > use core::time::Duration;
> >
> > use kernel::prelude::*;
> > -use kernel::time::Instant;
> > +use kernel::time::{Instant, Monotonic};
> >
> > pub(crate) const fn to_lowercase_bytes<const N: usize>(s: &str) -> [u8; N] {
> > let src = s.as_bytes();
> > @@ -35,7 +35,7 @@ pub(crate) const fn const_bytes_to_str(bytes: &[u8]) -> &str {
> > /// TODO[DLAY]: replace with `read_poll_timeout` once it is available.
> > /// (https://lore.kernel.org/lkml/20250220070611.214262-8-fujita.tomonori@gmail.com/)
> > pub(crate) fn wait_on<R, F: Fn() -> Option<R>>(timeout: Duration, cond: F) -> Result<R> {
> > - let start_time = Instant::now();
> > + let start_time = Instant::<Monotonic>::now();
> >
> > loop {
> > if let Some(ret) = cond() {
>
> I have applied that to the merge of the rust-timekeeping tree today,
> thanks.
The merge resolution now looks like this:
diff --git a/drivers/gpu/nova-core/util.rs b/drivers/gpu/nova-core/util.rs
index 64fb13760764..76cedf3710d7 100644
--- a/drivers/gpu/nova-core/util.rs
+++ b/drivers/gpu/nova-core/util.rs
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
use kernel::prelude::*;
-use kernel::time::{Delta, Instant};
+use kernel::time::{Delta, Instant, Monotonic};
pub(crate) const fn to_lowercase_bytes<const N: usize>(s: &str) -> [u8; N] {
let src = s.as_bytes();
@@ -33,7 +33,7 @@ pub(crate) const fn const_bytes_to_str(bytes: &[u8]) -> &str {
/// TODO[DLAY]: replace with `read_poll_timeout` once it is available.
/// (https://lore.kernel.org/lkml/20250220070611.214262-8-fujita.tomonori@gmail.com/)
pub(crate) fn wait_on<R, F: Fn() -> Option<R>>(timeout: Delta, cond: F) -> Result<R> {
- let start_time = Instant::now();
+ let start_time = Instant::<Monotonic>::now();
loop {
if let Some(ret) = cond() {
--
Cheers,
Stephen Rothwell
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists