Re: [PATCH V2 1/2] rust: cpu: Introduce CpuId abstraction

From: Miguel Ojeda
Date: Tue Jun 10 2025 - 05:43:51 EST


On Tue, Jun 10, 2025 at 8:07 AM Viresh Kumar <viresh.kumar@xxxxxxxxxx> wrote:
>
> What do you suggest ?

I think you are right, we should keep both directions of conversion.

(By the way, as far as I understand there is no way we could wrap
going to `i32`, but it may not hurt to add a `debug_assert!` in the
`u32` constructors.)

> Sorry, not sure I understood that. Are you talking about type of the
> `cpu` argument ?

Yeah.

Thanks!

Cheers,
Miguel