Re: [PATCH v16 8/9] task: rust: rework how current is accessed

John Hubbard
2025-05-08T20:25:43Z

On 5/7/25 9:55 AM, Boqun Feng wrote:
> On Wed, May 07, 2025 at 09:46:23AM -0700, Boqun Feng wrote:
>> On Wed, May 07, 2025 at 09:06:01AM -0700, Boqun Feng wrote:
>> [...]
>> Hmm.. this alone won't be enough, because miscdevice also uses mm. Maybe
>> you could most of mm defined even when CONFIG_MMU=n but keep
>> MmWithUserAsync only available when CONFIG_MMU=y?
>>
>
> Something like this, probably? But your choice ;-) Make CONFIG_RUST
> select CONFIG_MMU is fine but the question is who is going to unselect
> that at when?
>

In case it helps for the future: you should never select CONFIG_MMU.
You can depend on CONFIG_MMU, but forcibly selecting it is wrong,
because MMU support is a much broader system config decision than
CONFIG_RUST, and must not be auto-selected.

Also, some systems do not even have an MMU, and therefore should
not have CONFIG_MMU nor CONFIG_RUST forcibly selected.

thanks,
John