Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp201561rdb; Thu, 2 Nov 2023 00:32:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHgh17DfXvgGwHatlF8OoDhRBdSHeom4I86Tu4Xqj8lM5XWn3mllzL44IHO+d3QVjs1Bkdt X-Received: by 2002:a05:6a00:21d3:b0:68f:cc0e:355d with SMTP id t19-20020a056a0021d300b0068fcc0e355dmr17177674pfj.25.1698910369404; Thu, 02 Nov 2023 00:32:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698910369; cv=none; d=google.com; s=arc-20160816; b=FqRzAgwQ/hfM06cH3UDq3DmiCN8BdL2zEdZ52L8tqG6m+neLoDA7o2xrcYr1aly3N3 U3FccXgFtf3hS4fsAGZ7prjsXlBHbzQ0Rz8oqAOY566rQsMyjD8f7+mmFNaP3wEwCJyn u08+/SKB+zGBAVv90MsLCGeI99WPHavuXFqczb/EpRr2/+y0/nyujrjcBS2Z5ojvLmLv MTectTJcHxjPIVV8TidxAMoXp9U4szVksL4QxskBwaS+da5Ak8K0XDzhO39ZZPbMg/fo /0QH2uQIT/LTdB02/vn4C3lrzHvyoIdz97FEpo3qySgFxAfR5XWY5YmfGTGuHNxASfXv J+BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=NZhwnEw3EBGPDsB+thDm3sCH5alQ5IosIn7OZ4AThYs=; fh=/QPHva3s1KgxrpGt9MawY1vy02jSai2N8yZUuH/vFBg=; b=VqsqAsfYKuT4enlxej8v0szMiidzLSi/Q0xFnX55EyfoL1wn1kVFGQfU1Ukjh6B3u3 epzXG8KfIewSACJK9+GXWKQfaE/CUd1ncpbwUkcTfOpCGHeChJVXuCmbnokblflWRtlu oJn1epcWSkb7pF4Btc9npBDuANJeVHNfwItNvUnu4m76T51uw1pzQHfVFIqnwP3ghMAC xlZNSyxS9a+hXl9+fudaqGBZw+84ILJiljhFDXLencLwfRE1pA5QgHvwFe9NE4LSPJ6b WrSDHVsFOhaLDv6Dx5gLE73b8aeLrM6ymQXRRWwQeW3gNAMRkiiniHe7+ndwFzicL1vn lTgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id d3-20020a056a00244300b006c058c976bfsi3163465pfj.392.2023.11.02.00.32.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 00:32:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 38EDA80F5F06; Thu, 2 Nov 2023 00:32:27 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234262AbjKBH3x (ORCPT + 99 others); Thu, 2 Nov 2023 03:29:53 -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: X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 02 Nov 2023 00:32:27 -0700 (PDT) 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