Re: [PATCH v1 3/3] Revert "Revert "driver core: Set fw_devlink=on by default""

From: Sudeep Holla
Date: Tue Apr 27 2021 - 12:39:43 EST


On Tue, Apr 27, 2021 at 09:24:55AM -0700, Florian Fainelli wrote:

[...]

> This is a self inflicted problem that we have in that the bootloader
> provides a Device Tree to the kernel which is massaged in different ways
> and intends to stay backwards compatible as much as possible. And indeed
> after removing the 'mboxes' property gets us going with fw_devlink=on.
>

I assume the bootloader checks the presence of SMC support and modifies
the DT node accordingly. Can't it remove the mbox properties as it make
no sense with SMC compatible ? However ...

> >
> > 2. IIUC, the fw_devlink might use information from DT to establish the
> > dependency and having mailbox information in this context may be
> > considered wrong as there is no dependency if it is using SMC.
>
> Right, unfortunately, short of having some special casing for SCMI and
> checking that if we have both an "arm,smc-id" and "mboxes" phandle we
> should prefer the former, there is not probably much that can be done
> here. Do we want to do that?

I *think* we could do that in the SCMI drivers, but:
1. I am not sure if that helps fw_devlinks if they are deriving the info
purely based on DT
2. I am also afraid that someone might come up with exactly opposite
requirement that let us prefer mailbox over SMC as they would use
SMC only if h/w lacks proper mailbox support. I fear that we will get
into rabbit hole trying to do something like that.

--
Regards,
Sudeep