Re: [PATCH v1] rust: time: Avoid 64-bit integer division

From: FUJITA Tomonori
Date: Fri May 02 2025 - 20:14:39 EST


On Fri, 2 May 2025 01:38:43 +0200
Christian Schrefl <chrisi.schrefl@xxxxxxxxx> wrote:

>>> What is Arm specific here? I'm not aware of the compiler doing anything
>>
>> Because Arm is the only 32bit architecture that selects CONFIG_HAVE_RUST
>> for non-UML cases, i.e. this is the only 32bit architecture that has
>> this problem. If your point is we should do this for all 32bit
>> architectures, then I won't disagree. Just s/CONFIG_ARM/CONFIG_32BIT
>> then.
>
> I would be for using `CONFIG_32BIT` since from what I understand this
> applies to all 32bit architectures. It feels a bit weird to single out
> arm just because it is the only one that currently has rust support.

CONFIG_32BIT doesn't work because 32-bit ARM doesn't set it. I use
CONFIG_64BIT, enabled on all 64-bit architectures supported by Rust.

https://lore.kernel.org/lkml/20250502004524.230553-1-fujita.tomonori@xxxxxxxxx/

Unlike CONFIG_ARM, the intention behind CONFIG_64BIT is clear, so I
also think it's the better choice.

Thanks!