All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Hindborg <a.hindborg@kernel.org>
To: "FUJITA Tomonori" <fujita.tomonori@gmail.com>
Cc: <rust-for-linux@vger.kernel.org>,  "Gary Guo" <gary@garyguo.net>,
	"Alice Ryhl" <aliceryhl@google.com>,
	 "Fiona Behrens" <me@kloenk.dev>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	<linux-kernel@vger.kernel.org>,  <netdev@vger.kernel.org>,
	<andrew@lunn.ch>,  <hkallweit1@gmail.com>,  <tmgross@umich.edu>,
	<ojeda@kernel.org>,  <alex.gaynor@gmail.com>,
	<bjorn3_gh@protonmail.com>,  <benno.lossin@proton.me>,
	<a.hindborg@samsung.com>,  <anna-maria@linutronix.de>,
	<frederic@kernel.org>,  <tglx@linutronix.de>,  <arnd@arndb.de>,
	<jstultz@google.com>,  <sboyd@kernel.org>,  <mingo@redhat.com>,
	<peterz@infradead.org>,  <juri.lelli@redhat.com>,
	<vincent.guittot@linaro.org>,  <dietmar.eggemann@arm.com>,
	<rostedt@goodmis.org>,  <bsegall@google.com>,  <mgorman@suse.de>,
	<vschneid@redhat.com>,  <tgunders@redhat.com>,
	<david.laight.linux@gmail.com>,  <boqun.feng@gmail.com>
Subject: Re: [PATCH v15 5/6] rust: time: Add wrapper for fsleep() function
Date: Mon, 28 Apr 2025 20:16:47 +0200	[thread overview]
Message-ID: <871ptc40ds.fsf@kernel.org> (raw)
In-Reply-To: <20250423192857.199712-6-fujita.tomonori@gmail.com> (FUJITA Tomonori's message of "Thu, 24 Apr 2025 04:28:55 +0900")

Hi Tomonori,

"FUJITA Tomonori" <fujita.tomonori@gmail.com> writes:

> Add a wrapper for fsleep(), flexible sleep functions in
> include/linux/delay.h which typically deals with hardware delays.
>
> The kernel supports several sleep functions to handle various lengths
> of delay. This adds fsleep(), automatically chooses the best sleep
> method based on a duration.
>
> sleep functions including fsleep() belongs to TIMERS, not
> TIMEKEEPING. They are maintained separately. rust/kernel/time.rs is an
> abstraction for TIMEKEEPING. To make Rust abstractions match the C
> side, add rust/kernel/time/delay.rs for this wrapper.
>
> fsleep() can only be used in a nonatomic context. This requirement is
> not checked by these abstractions, but it is intended that klint [1]
> or a similar tool will be used to check it in the future.

I get an error when building this patch for arm32:

  + kernel-make -j 96 O=/home/aeh/src/linux-rust/test-build-arm-1.78.0 vmlinux modules
  ld.lld: error: undefined symbol: __aeabi_uldivmod
  >>> referenced by kernel.df165ca450b1fd1-cgu.0
  >>>               rust/kernel.o:(kernel::time::delay::fsleep) in archive vmlinux.a
  >>> did you mean: __aeabi_uidivmod
  >>> defined in: vmlinux.a(arch/arm/lib/lib1funcs.o)

Looks like a division function of some sort is not defined. Can you
reproduce?


Best regards,
Andreas Hindborg



  reply	other threads:[~2025-04-28 18:17 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23 19:28 [PATCH v15 0/6] rust: Add IO polling FUJITA Tomonori
2025-04-23 19:28 ` [PATCH v15 1/6] rust: hrtimer: Add Ktime temporarily FUJITA Tomonori
2025-04-23 19:28 ` [PATCH v15 2/6] rust: time: Add PartialEq/Eq/PartialOrd/Ord trait to Ktime FUJITA Tomonori
2025-04-23 19:28 ` [PATCH v15 3/6] rust: time: Introduce Delta type FUJITA Tomonori
2025-04-23 19:28 ` [PATCH v15 4/6] rust: time: Introduce Instant type FUJITA Tomonori
2025-04-23 19:28 ` [PATCH v15 5/6] rust: time: Add wrapper for fsleep() function FUJITA Tomonori
2025-04-28 18:16   ` Andreas Hindborg [this message]
2025-04-29 13:17     ` FUJITA Tomonori
2025-04-29 14:16       ` Christian Schrefl
2025-04-29 14:31         ` Russell King (Oracle)
2025-04-29 14:35       ` Miguel Ojeda
2025-04-30 13:51         ` FUJITA Tomonori
2025-04-30 14:50           ` Boqun Feng
2025-04-30 16:43           ` Christian Schrefl
2025-04-29 15:51       ` Arnd Bergmann
2025-04-29 16:03         ` Boqun Feng
2025-04-29 16:11           ` Arnd Bergmann
2025-04-29 17:15             ` Boqun Feng
2025-04-29 18:33               ` Arnd Bergmann
2025-04-29 19:14                 ` Boqun Feng
2025-04-29 19:27                   ` Boqun Feng
2025-04-23 19:28 ` [PATCH v15 6/6] MAINTAINERS: rust: Add a new section for all of the time stuff FUJITA Tomonori
2025-04-30 10:40 ` [PATCH v15 0/6] rust: Add IO polling Andreas Hindborg

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=871ptc40ds.fsf@kernel.org \
    --to=a.hindborg@kernel.org \
    --cc=a.hindborg@samsung.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=andrew@lunn.ch \
    --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=bsegall@google.com \
    --cc=daniel.almeida@collabora.com \
    --cc=david.laight.linux@gmail.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=frederic@kernel.org \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=hkallweit1@gmail.com \
    --cc=jstultz@google.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=me@kloenk.dev \
    --cc=mgorman@suse.de \
    --cc=mingo@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tgunders@redhat.com \
    --cc=tmgross@umich.edu \
    --cc=vincent.guittot@linaro.org \
    --cc=vschneid@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.