Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp4645736pxy; Tue, 27 Apr 2021 09:28:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLZF5KFKaZqqGM9kKfarufEzpBKTMOo7PEj7fG0zaA/h1dzGUpDeiLTRGH/2+CG71Io/2Z X-Received: by 2002:aa7:d2d6:: with SMTP id k22mr5325228edr.9.1619540896367; Tue, 27 Apr 2021 09:28:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619540896; cv=none; d=google.com; s=arc-20160816; b=Ji3oNM4u+o7z+bq6DHwI2hp2k/qsXNNtarp7yFOJxZoRV9ekzuZkqZnCwM4rk573l7 W1Ism8Ql3TKkLH/2MIc1xxAjQIPp8MQJOf8KZ2dlt0H1h4MTljx9zVKjoNfXxAil7YuU sCxAAEYkpFS5Fl2cFNTzUtLbo+8nx7T/wblhlAAgXcwSQ8qK+o9PNlMlNXk6S6HmkdJu Sy+0u7Vkvf6kWIl/NsNtS0gJEx30isV5QKylJbFdMHpYEnpMllTh/i8dRyAc6sxpcnTK KiyRiWtloxSh5KIkW5Pcs1Vhne0b5l3fCGLthdS37zri+YHXTp6JjusqqlNrAKDj0oTI ytDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=sz9P7MFs8zTLBNG+2+2rZi1XeoWMwNscYNT1QWJ7kT8=; b=yk4bzQ4nSREiB/R50Np+ntapnK+l7Kkfm8hfjRlyFpFTqa2W8ryzpVluDxBq/O1GlW EIxYf71hb07dWY/OfpPRZTr9mRYYY+x7uaX8FSXnuUfnEnQ1r+bMrQqg9d0fDjIDP16A 1p2nXtrjMzFmd1eplYGma7ikcqv5V6PEuWyKih7PBblDnQSA+iw+ksihiXYFFD9ZcAQS wC5E7Ha9p+roqTX9VAVzhSKqe0plrIPWbZyiOel4JHhjxImcy/XIfuhVXMEv1Km0n9dT Ud2uo3LmB/akHLMiy+h86sRaA+Fsiwq4NT5sGmeF6D4sztoJvJN4EXB+ufdEuNtYclZv 8YgQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WB6RYzrV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g3si3009808edw.592.2021.04.27.09.27.52; Tue, 27 Apr 2021 09:28:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=WB6RYzrV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238893AbhD0Q1N (ORCPT + 99 others); Tue, 27 Apr 2021 12:27:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238665AbhD0Q02 (ORCPT ); Tue, 27 Apr 2021 12:26:28 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA2E5C06138C for ; Tue, 27 Apr 2021 09:24:58 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id v20so3902136plo.10 for ; Tue, 27 Apr 2021 09:24:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=sz9P7MFs8zTLBNG+2+2rZi1XeoWMwNscYNT1QWJ7kT8=; b=WB6RYzrV/IWNcQ9HN0129xjN5zWiKD/0ZgO3v4ihzUMKrzT5MlrcMfu96fuRKRXsk6 WtAqxWOeOTX6Q8CPDkPO5WpgSrMZ7EHnv/vWYVc9lJOCqdJmXpMh4P0da0iG8k37Mhq4 YPJYzGVDRu+nIgsfo1xvVw7bIBtreFRPPfHTpnOzEHKKTAwTbqGSO1YIXp8RkYIUYd2W brSbPpG0ZYPuxqqxdwLxxn8xSlTIlnw/c+GAgKGmOLbpODt3QaECUwcIt4yH/4jnnNHS 8aSG6C+dnyhbWUmmhr+thix1TIlWyy9WTw7xc8a3q3zbgIJGChSVWDSrvxUYk0j7/0X4 y/YA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sz9P7MFs8zTLBNG+2+2rZi1XeoWMwNscYNT1QWJ7kT8=; b=kJ2x3fpC4/Gg/jbgLD7hZG/oBiSjuUa2htMOq1zL1Yw9W/7ue/D1TFmTLuIExngDEr idjiFUaj2c0lGG+DjT3yLxvz6j2+q4zC53+d+A0WK0C2Kj8lXHyAYkaXr9SN/2gsOkxw FqaaLnXDl/oO8n2sZGiV3FIt6C3wWtjrusABrYYuCK6iUG+8ZUSi4FduxtaeapOzMMNv 0dDdzIVWbk7IQqyitpN2kx71dhmLwSZb98+vaTyiFcG3MeLluFURR4IrOpPNRVSjC7/O WsL1ZAvcO3iFfKR3pirJv6BVX59q8Eukf+2vdn1uz4RYPFg43QFoMldYE3eZsA7NoWUN lJTw== X-Gm-Message-State: AOAM531oSOmosaHS8HMYD83EWsJ1sMzqAG5yiHwNUxnrZAxmnnp+MK1e H/8YAB4ae/efVvxsg02Mc9E+hMzvcd0= X-Received: by 2002:a17:902:d50c:b029:ed:1bda:a029 with SMTP id b12-20020a170902d50cb02900ed1bdaa029mr14321373plg.8.1619540697947; Tue, 27 Apr 2021 09:24:57 -0700 (PDT) Received: from [192.168.1.67] (99-44-17-11.lightspeed.irvnca.sbcglobal.net. [99.44.17.11]) by smtp.gmail.com with ESMTPSA id w23sm217583pgi.63.2021.04.27.09.24.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 27 Apr 2021 09:24:57 -0700 (PDT) Subject: Re: [PATCH v1 3/3] Revert "Revert "driver core: Set fw_devlink=on by default"" To: Sudeep Holla , Cristian Marussi Cc: Jim Quinlan , Saravana Kannan , Greg Kroah-Hartman , "Rafael J. Wysocki" , Al Cooper , Michael Walle , Jon Hunter , Marek Szyprowski , Geert Uytterhoeven , Guenter Roeck , Android Kernel Team , LKML References: <20210302211133.2244281-1-saravanak@google.com> <20210302211133.2244281-4-saravanak@google.com> <60989b90-7f8a-5306-e7d7-c5461bc9ac68@gmail.com> <23ab7a11-330c-4d3d-00c1-984c5248464e@gmail.com> <20210427074807.GI43717@e120937-lin> <20210427141116.GJ43717@e120937-lin> <20210427151042.j7hku7pxqz56uyt6@bogus> From: Florian Fainelli Message-ID: <0887ce92-e9d8-47ec-0077-4c1f2fd46f87@gmail.com> Date: Tue, 27 Apr 2021 09:24:55 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210427151042.j7hku7pxqz56uyt6@bogus> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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