Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp804102pxb; Thu, 5 Nov 2020 13:30:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJwQiXn6HvqvHoyxButU5y8UY5ds2vxT2Yr4T4OvbE38dqoiQvO8cuEcOPKxFNC+/CGpb1Yk X-Received: by 2002:a17:906:7c9:: with SMTP id m9mr4315817ejc.178.1604611815739; Thu, 05 Nov 2020 13:30:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604611815; cv=none; d=google.com; s=arc-20160816; b=w23PK5Lv5xu0aWoTtztVvyt0bAwFag8Y8yZKBJBHCBMRz69kbVY4h9Up+SnR/qoy8v JX4b9kG/SeO9xQPJmvsJOO+7FYsW22B0esxGQvJ/xqzq/aXk0bAEVfmZ6NsJUVqxLhW5 IcUOQTjMP+tkVw5j85CCE53RexaaB9xmEy0sK3q1frz8qgVG0LQZUA2GLl8ivpMLR00q A7T5dGVjvGSqriNJXSgCp735nzyWnZv1d3oGcEtm3xi/DbXRBRHt3U01mqaOz8+qZ4lE Kf2ji4jaSviOlHHATvjj5gUHOEtrhBqxtKfPCw5xJAK5PqcVI6QZA1NPM4W7qLh8O4LL W2yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=mZJihKNelf3oDhC6IDO3p5n6m/waFY44JOcBdFiWbRU=; b=InzSuUKp8yxxNmUaAMroeLzC/xkTA0Gmecwibi3OTX6n5msvNpnSdD1l9KKV017nLn FH+AVoRXxEB+k8sAVi4N/Ca7AajMea2J4fRfv7dn6at6R1zFgJzT7XEDqBlrV6YMj4Tx eTHR1FS2wHiKTQE59EWhT5VzrGBL/+QuPEMoYMMu6uLiQowylJd/wGsjjS9b0fA6cEwV haHQprq5JUgoDe166xESM/T+aLOfnB53O+/Hr3QoEPr2XFK95IOY9y24tbAwnxZnYfo2 iloTIklog9Tmu/HJTgVIoVT6dfHZg1uARN+i/bL3WWpTsKufgOye/VQ5iUCWLo5V+lTk gqAA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w20si2051013eji.110.2020.11.05.13.29.53; Thu, 05 Nov 2020 13:30:15 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732308AbgKEV2P (ORCPT + 99 others); Thu, 5 Nov 2020 16:28:15 -0500 Received: from plasma4.jpberlin.de ([80.241.57.33]:38657 "EHLO plasma4.jpberlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732035AbgKEV2N (ORCPT ); Thu, 5 Nov 2020 16:28:13 -0500 Received: from spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) by plasma.jpberlin.de (Postfix) with ESMTP id 705E2AB92A; Thu, 5 Nov 2020 22:21:47 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from plasma.jpberlin.de ([80.241.56.68]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id 2lzrKWRbseOK; Thu, 5 Nov 2020 22:21:46 +0100 (CET) Received: from webmail.opensynergy.com (unknown [217.66.60.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "*.opensynergy.com", Issuer "Starfield Secure Certificate Authority - G2" (not verified)) (Authenticated sender: opensynergy@jpberlin.de) by plasma.jpberlin.de (Postfix) with ESMTPSA id 4DF58AB8ED; Thu, 5 Nov 2020 22:21:46 +0100 (CET) From: Peter Hilber To: , CC: Igor Skalkin , Peter Hilber , Rob Herring , , , , , , , Subject: [RFC PATCH v2 04/10] firmware: arm_scmi: Add per message transport data Date: Thu, 5 Nov 2020 22:21:10 +0100 Message-ID: <20201105212116.411422-5-peter.hilber@opensynergy.com> In-Reply-To: <20201105212116.411422-1-peter.hilber@opensynergy.com> References: <20201105212116.411422-1-peter.hilber@opensynergy.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-ClientProxiedBy: SR-MAIL-01.open-synergy.com (10.26.10.21) To SR-MAIL-01.open-synergy.com (10.26.10.21) X-MBO-SPAM-Probability: X-Rspamd-Score: -3.38 / 15.00 / 15.00 X-Rspamd-Queue-Id: 705E2AB92A X-Rspamd-UID: 309b30 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Igor Skalkin The virtio transport in this patch series can be simplified by using the scmi_xfer tx/rx buffers for data exchange with the virtio device, and for saving the message state. But the virtio transport requires prepending a transport-specific header. Also, for data exchange using virtqueues, the tx and rx buffers should not overlap. The first step to solve the aforementioned issues is to add a transport-specific data pointer to scmi_xfer. Co-developed-by: Peter Hilber Signed-off-by: Peter Hilber Signed-off-by: Igor Skalkin --- drivers/firmware/arm_scmi/common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h index 9a8359ecd220..c998ec29018e 100644 --- a/drivers/firmware/arm_scmi/common.h +++ b/drivers/firmware/arm_scmi/common.h @@ -131,6 +131,7 @@ struct scmi_msg { * buffer for the rx path as we use for the tx path. * @done: command message transmit completion event * @async_done: pointer to delayed response message received event completion + * @extra_data: Transport-specific private data pointer */ struct scmi_xfer { int transfer_id; @@ -139,6 +140,7 @@ struct scmi_xfer { struct scmi_msg rx; struct completion done; struct completion *async_done; + void *extra_data; }; void scmi_xfer_put(const struct scmi_handle *h, struct scmi_xfer *xfer); -- 2.25.1