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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4EBBC4332F for ; Thu, 2 Nov 2023 07:29:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343553AbjKBH3w (ORCPT ); Thu, 2 Nov 2023 03:29:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234177AbjKBH3v (ORCPT ); Thu, 2 Nov 2023 03:29:51 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0FB7212F; Thu, 2 Nov 2023 00:29:49 -0700 (PDT) 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 E99B52F4; Thu, 2 Nov 2023 00:30:30 -0700 (PDT) Received: from pluto (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 308B53F64C; Thu, 2 Nov 2023 00:29:47 -0700 (PDT) Date: Thu, 2 Nov 2023 07:29:44 +0000 From: Cristian Marussi To: Oleksii Moisieiev Cc: "sudeep.holla@arm.com" , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Linus Walleij , "linux-arm-kernel@lists.infradead.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-gpio@vger.kernel.org" Subject: Re: [RFC v5 2/5] drivers: firmware: scmi: Introduce scmi_get_max_msg_size function Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Fri, Oct 27, 2023 at 06:28:09AM +0000, Oleksii Moisieiev wrote: > Current SCMI implementation supports only receiving arrays from the > SCMI server and provides helpers to process received data. It uses > msg_max_size value to determine maximum message size that can be > transmitted via selected protocol. When sending arrays to SCMI server > this value should be checked by the Client driver to prevent > overflowing protocol buffers. > That's why scmi_get_max_msg_size call was introduced. > Hi Oleksii, indeed given the new variable sized v3.2 SCMI requests (instead of responses) this common helper is now needed for the protocols to be able to properly size and chunk their command requests, BUT this is a new core helper that has potentially to be available to any future protocol so it has to be exposed as a common helpers in helpers_ops (like iterators or extended_name helpers), if NOT this common method won't be available to protocols when compiled as distinct loadable modules (vendor-modules can be defined and built as LKM) Thanks, Cristian