From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6AF1FC432C0 for ; Tue, 3 Dec 2019 12:00:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3CEF8206EC for ; Tue, 3 Dec 2019 12:00:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726079AbfLCMAG (ORCPT ); Tue, 3 Dec 2019 07:00:06 -0500 Received: from foss.arm.com ([217.140.110.172]:41158 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725773AbfLCMAG (ORCPT ); Tue, 3 Dec 2019 07:00:06 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5129230E; Tue, 3 Dec 2019 04:00:05 -0800 (PST) Received: from bogus (e107155-lin.cambridge.arm.com [10.1.196.42]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 50C3A3F68E; Tue, 3 Dec 2019 04:00:04 -0800 (PST) Date: Tue, 3 Dec 2019 12:00:02 +0000 From: Sudeep Holla To: Viresh Kumar Cc: Vincent Guittot , Arnd Bergmann , Jassi Brar , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sudeep Holla Subject: Re: [PATCH] firmware: arm_scmi: Make scmi core independent of transport type Message-ID: <20191203120002.GB4171@bogus> References: <5c545c2866ba075ddb44907940a1dae1d823b8a1.1575019719.git.viresh.kumar@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5c545c2866ba075ddb44907940a1dae1d823b8a1.1575019719.git.viresh.kumar@linaro.org> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 29, 2019 at 03:01:39PM +0530, Viresh Kumar wrote: > The SCMI specification is fairly independent of the transport protocol, > which can be a simple mailbox (already implemented) or anything else. > The current Linux implementation however is very much dependent of the > mailbox transport layer. > > This patch makes the SCMI core code (driver.c) independent of the > mailbox transport layer and moves all mailbox related code to a new > file: mailbox.c. > The implementation looks fine to me. > We can now implement more transport protocols to transport SCMI > messages. > I am more interested in this part. As I am aware the only 2 other transport being discussed is SMC/HVC and new/yet conceptual SPCI(built on top of SMC/HVC). There are already discussions on the list to make former as mailbox[1]. While I see both pros and cons with that approach, there's a need to converge. One main advantage I see with SMC/HVC mailbox is that it can be used with any other client and not just SCMI. Equally, the queuing in the mailbox may not be needed with fast SMC/HVC but may be needed for new SPCI(not yet fully analysed). > The transport protocols just need to provide struct scmi_transport_ops, > with its version of the callbacks to enable exchange of SCMI messages. > As I mentioned I am fine with implementation in this patch. But I would like to hear especially from Arnd and Jassi as the abstraction look more like mailbox APIs themselves and may look like duplication. I don't want people to realise late that this is not good idea for whatever reasons. If we have valid and enough reasons to do so, we can take this approach. I really need some feedback here. -- Regards, Sudeep [1] https://lore.kernel.org/lkml/1575281525-1549-1-git-send-email-peng.fan@nxp.com