Re: [TECH TOPIC] Rust for Linux

Arnd Bergmann
2021-07-19T21:31:51Z

On Mon, Jul 19, 2021 at 7:32 PM Wedson Almeida Filho
<wedsonaf@google.com> wrote:
> On Mon, Jul 19, 2021 at 04:02:38PM +0200, Arnd Bergmann wrote:
>
> At the moment we lose information about the device, but simply because we
> haven't implemented dev_ variants yet, there is no fundamental reason for this
> though.
>
...
>
> Yes, it uses spinlock_t. But again, just because we don't have an implementation
> that uses raw_spinlock_t yet.
>
...
> It's not there yet, but the idea is to wrap the place where `drv.pm` is
> initialised in the amba code with `if cfg!(CONFIG_PM)` -- if CONFIG_PM is
> disabled, all references to PM code are gone and they are removed by the
> compiler. This way we move configuration-dependent code out of drivers and into
> core libraries.

Ok, that all sounds good to me. I'll reply separately on the coding style.

Arnd