Re: [PATCH v5 6/7] rust: Add read_poll_timeout functions

From: FUJITA Tomonori
Date: Sat Nov 09 2024 - 00:15:51 EST


On Wed, 6 Nov 2024 10:18:03 -0800
Boqun Feng <boqun.feng@xxxxxxxxx> wrote:

> On Fri, Nov 01, 2024 at 10:01:20AM +0900, FUJITA Tomonori wrote:
> [...]
>> @@ -44,6 +45,7 @@
>> pub mod page;
>> pub mod prelude;
>> pub mod print;
>> +pub mod processor;
>> pub mod sizes;
>> pub mod rbtree;
>> mod static_assert;
>> diff --git a/rust/kernel/processor.rs b/rust/kernel/processor.rs
>> new file mode 100644
>> index 000000000000..eeeff4be84fa
>> --- /dev/null
>> +++ b/rust/kernel/processor.rs
>
> What else would we put into this file? `smp_processor_id()` and IPI
> functionality?

Yeah, we would need smp_processor_id() but not sure about the other
functions. There aren't many processor-related functions that Rust
drivers directly need to call, I guess.

> If so, I would probably want to rename this to cpu.rs.

Fine by me, I'll go with cpu.rs in the next version.

I chose processor.rs just because the C side uses processor.h for
cpu_relax() but cpu.rs also looks good.