linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: Cristian Marussi <cristian.marussi@arm.com>,
	Jim Quinlan <james.quinlan@broadcom.com>,
	Saravana Kannan <saravanak@google.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Al Cooper <alcooperx@gmail.com>, Michael Walle <michael@walle.cc>,
	Jon Hunter <jonathanh@nvidia.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Guenter Roeck <linux@roeck-us.net>,
	Android Kernel Team <kernel-team@android.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 3/3] Revert "Revert "driver core: Set fw_devlink=on by default""
Date: Tue, 27 Apr 2021 09:50:33 -0700	[thread overview]
Message-ID: <1e4b602d-5ed8-19a3-2cd1-b3fe27e7ff8d@gmail.com> (raw)
In-Reply-To: <20210427163913.svx2w2mxo4w3is32@bogus>



On 4/27/2021 9:39 AM, Sudeep Holla wrote:
> 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 ...

The bootloader has always assumed the SMC support was there from the day
we introduced it because it was. What changed is the way we advertised
to Linux that support. We used to have a custom mailbox driver that
would be pretty much what the ARM SMC transport eventually came to be.

Since we still support earlier kernels that were deployed with the old
mailbox we cannot arbitrarily break that setup, especially as our
customers tend to be slow in picking up new kernel versions, fortunately
before they get to 5.13 we can mandate a new bootloader that may not be
compatible with their 4.1 kernel anymore, or at least not without some
backporting of the ARM SMC transport, that's all fair IMHO.

> 
>>>
>>> 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.

That is true, and to get to the SCMI driver, even the base protocol you
must have been probed, so we have a nice chicken and egg problem. I
highly appreciate your time understanding the context and trying to find
a solution it is pretty clear that we must fix our FDT now.
-- 
Florian

  reply	other threads:[~2021-04-27 16:50 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 21:11 [PATCH v1 0/3] driver core: Set fw_devlink=on take II Saravana Kannan
2021-03-02 21:11 ` [PATCH v1 1/3] driver core: Avoid pointless deferred probe attempts Saravana Kannan
2021-03-09 23:26   ` Saravana Kannan
2021-03-23 13:58     ` Greg Kroah-Hartman
2021-03-02 21:11 ` [PATCH v1 2/3] driver core: Update device link status properly for device_bind_driver() Saravana Kannan
2021-03-12 16:59   ` Jon Hunter
2021-03-02 21:11 ` [PATCH v1 3/3] Revert "Revert "driver core: Set fw_devlink=on by default"" Saravana Kannan
     [not found]   ` <161670714806.3012082.14889556041667946511@swboyd.mtv.corp.google.com>
2021-03-25 21:59     ` Saravana Kannan
2021-04-26 20:51   ` Florian Fainelli
2021-04-26 21:33     ` Saravana Kannan
2021-04-26 21:47       ` Florian Fainelli
2021-04-27  7:05         ` Geert Uytterhoeven
2021-04-27  7:48         ` Cristian Marussi
     [not found]           ` <CA+-6iNz_kL0DnbRb0A=WSSLK0mnqw35S47TDXq5rhwXL_VWdPg@mail.gmail.com>
2021-04-27 14:11             ` Cristian Marussi
2021-04-27 15:10               ` Sudeep Holla
2021-04-27 16:24                 ` Saravana Kannan
2021-04-27 16:47                   ` Florian Fainelli
2021-04-27 21:05                     ` Saravana Kannan
2021-04-28  8:40                     ` Sudeep Holla
2021-04-27 16:24                 ` Florian Fainelli
2021-04-27 16:28                   ` Saravana Kannan
2021-04-27 16:42                     ` Sudeep Holla
2021-04-27 16:39                   ` Sudeep Holla
2021-04-27 16:50                     ` Florian Fainelli [this message]
2021-04-27 17:10                       ` Geert Uytterhoeven
2021-03-02 22:24 ` [PATCH v1 0/3] driver core: Set fw_devlink=on take II Michael Walle
2021-03-02 22:42   ` Saravana Kannan
2021-03-02 22:47     ` Saravana Kannan
2021-03-03  8:59       ` Michael Walle
2021-03-03  9:28         ` Saravana Kannan
2021-03-03 10:21           ` Michael Walle
2021-03-05  3:25             ` Saravana Kannan
2021-03-03  9:22 ` Geert Uytterhoeven
2021-03-03  9:24   ` Saravana Kannan
2021-03-03 10:02     ` Geert Uytterhoeven
2021-03-03 16:55       ` Saravana Kannan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e4b602d-5ed8-19a3-2cd1-b3fe27e7ff8d@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=alcooperx@gmail.com \
    --cc=cristian.marussi@arm.com \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=james.quinlan@broadcom.com \
    --cc=jonathanh@nvidia.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=m.szyprowski@samsung.com \
    --cc=michael@walle.cc \
    --cc=rafael@kernel.org \
    --cc=saravanak@google.com \
    --cc=sudeep.holla@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).