[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <871ptc40ds.fsf@kernel.org>
Date: Mon, 28 Apr 2025 20:16:47 +0200
From: Andreas Hindborg <a.hindborg@...nel.org>
To: "FUJITA Tomonori" <fujita.tomonori@...il.com>
Cc: <rust-for-linux@...r.kernel.org>, "Gary Guo" <gary@...yguo.net>,
"Alice Ryhl" <aliceryhl@...gle.com>, "Fiona Behrens" <me@...enk.dev>,
"Daniel Almeida" <daniel.almeida@...labora.com>,
<linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>,
<andrew@...n.ch>, <hkallweit1@...il.com>, <tmgross@...ch.edu>,
<ojeda@...nel.org>, <alex.gaynor@...il.com>,
<bjorn3_gh@...tonmail.com>, <benno.lossin@...ton.me>,
<a.hindborg@...sung.com>, <anna-maria@...utronix.de>,
<frederic@...nel.org>, <tglx@...utronix.de>, <arnd@...db.de>,
<jstultz@...gle.com>, <sboyd@...nel.org>, <mingo@...hat.com>,
<peterz@...radead.org>, <juri.lelli@...hat.com>,
<vincent.guittot@...aro.org>, <dietmar.eggemann@....com>,
<rostedt@...dmis.org>, <bsegall@...gle.com>, <mgorman@...e.de>,
<vschneid@...hat.com>, <tgunders@...hat.com>,
<david.laight.linux@...il.com>, <boqun.feng@...il.com>
Subject: Re: [PATCH v15 5/6] rust: time: Add wrapper for fsleep() function
Hi Tomonori,
"FUJITA Tomonori" <fujita.tomonori@...il.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
Powered by blists - more mailing lists