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>,
	Cristian Marussi <cristian.marussi@arm.com>
Cc: 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:24:55 -0700	[thread overview]
Message-ID: <0887ce92-e9d8-47ec-0077-4c1f2fd46f87@gmail.com> (raw)
In-Reply-To: <20210427151042.j7hku7pxqz56uyt6@bogus>



On 4/27/2021 8:10 AM, Sudeep Holla wrote:
> On Tue, Apr 27, 2021 at 03:11:16PM +0100, Cristian Marussi wrote:
>> On Tue, Apr 27, 2021 at 09:33:31AM -0400, Jim Quinlan wrote:
> [...]
>>>>
>>> I believe that the brcmstb-mbox node is in our DT for backwards
>>> compatibility with our older Linux only.   Note that  we use the compatible
>>> string '"arm,scmi-smc", "arm,scmi"'; the former chooses SMC transport and
>>> ignores custom  mailboxes such as brcmstb-mbox.
>>>
>>
>> Right..so it is even more wrong that it is waiting for the mailboxes...but
>> looking at the DT:
>>
>> brcm_scmi_mailbox@0 {
>>                 #mbox-cells = <0x01>;
>>                 compatible = "brcm,brcmstb-mbox";
>>                 status = "disabled";
>>                 linux,phandle = <0x04>;
>>                 phandle = <0x04>;
>>         };
>>
>> brcm_scmi@0 {
>>                 compatible = "arm,scmi-smc\0arm,scmi";
>>                 mboxes = <0x04 0x00 0x04 0x01>;
>>                 mbox-names = "tx\0rx";
>>                 shmem = <0x05>;
>>                 status = "disabled";
>>                 arm,smc-id = <0x83000400>;
>>                 interrupt-names = "a2p";
>>                 #address-cells = <0x01>;
>>                 #size-cells = <0x00>;
>>
>> it seems to me that even though you declare an SMC based transport (and in fact
>> you define the smc-id too) you also still define mboxes (as a fallback I suppose)
>> referring to the brcm_scmi_mailbox phandle, and while this is ignored by the SCMI
>> driver (because you have selected a compatible SMC transport) I imagine this dep
>> is picked up by fw_devlink which in fact says:
>>
>>> [    0.300086] platform brcm_scmi@0: Linked as a consumer to brcm_scmi_mailbox@0
>>
>> and stalls waiting for it. (but I'm not really familiar on how fw_devlink
>> internals works really...so I maybe off in these regards)
>>
> 
> I was about to mention/ask the same when I saw Jim's reply. I see you have
> already asked that. Couple of my opinions based on my very limited knowledge
> on fw_devlink and how it works.
> 
> 1. Since we have different compatible for SMC and mailbox, I am not sure
>    if it correct to leave mailbox information in scmi node. Once we have
>    proper yaml scheme, we must flag that error IMO.

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.

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

Thank you all for looking into this!
-- 
Florian

  parent reply	other threads:[~2021-04-27 16:26 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 [this message]
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
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=0887ce92-e9d8-47ec-0077-4c1f2fd46f87@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).