Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1345702pxk; Fri, 18 Sep 2020 09:59:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwI5dkvKb9msAxJ11dnJ5RILbuHSk1jrDrRnOoa5ZklpXldpS6ltxPfjuDv0KIAAxgxqIst X-Received: by 2002:aa7:cb44:: with SMTP id w4mr39931284edt.139.1600448360618; Fri, 18 Sep 2020 09:59:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600448360; cv=none; d=google.com; s=arc-20160816; b=vKZhTEK/G8jB8ZEFlek7+1I8G6IASD3W6wgTqPWq6NLtuDzDHCQ+wEf7gsQ5nNxVTu bZEQdzoDhZXwfLkl81COJL0M2c5o9Mo0pk1I3yiMvbFGDD2J6K7kM8Ylj6QyzEf4kAM9 D/2sb+FfCZqOTh1HATdbMepBiLG4C36l/fD309pRqpW3nkK+cmr4bV15Dubf6nfCW+Kg +xbuy2AGGQSH0jruU6n9UkMOReFrGYgViYJkkApe/50od9XkMdAIs8al2seGKNmqwzQd BZnavc9itDo6TeoFa9JQBaw/P86bQUJBbWT2YWrGxypm1wXl3RVCFzu/ZoCLJM/3A+mh Emvw== 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=dbsN1B/jf2M48Jm9ff6D3V8CxyItG/YRg1+6LMhTs+k=; b=Z2fXOzVrMc3RzNDVnAL+21Lxpcnq2GB0hXqVre8nwTjgRPoBqTr1H5IDednok9QemT WyQW+2zG9hGTPu4/f28EdvuaZWifE+wAj/Jz0GWXSxc/FQd4yTMHmpY5uH85ar0XZH8i SxCAUZ+TDJXdk3rFWvEnzv5kU4B6CxcDFXJFHyVx+uFnMWrQ6Vd0HVpT0mOzbWBZ5fku gvhMBYnysFHV1l3mun7frYMME363/HLztaU7pbgurZ5KPbpRgefrDAjk73B8kFFOi0tg Bbmt+8uEbK1ZURlLVpJIKFcbl6B7K4PSeyk1WAfIiURxsXCW2lRhHz8eRjRtB5LhqFnR ECOA== 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 by16si2474807edb.294.2020.09.18.09.58.56; Fri, 18 Sep 2020 09:59:20 -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; 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 S1726236AbgIRQzf (ORCPT + 99 others); Fri, 18 Sep 2020 12:55:35 -0400 Received: from plasma31.jpberlin.de ([80.241.56.82]:9883 "EHLO plasma31.jpberlin.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726044AbgIRQzf (ORCPT ); Fri, 18 Sep 2020 12:55:35 -0400 Received: from spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) by plasma.jpberlin.de (Postfix) with ESMTP id 8BABF100E7E; Fri, 18 Sep 2020 18:55:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from plasma.jpberlin.de ([80.241.56.76]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id CuQEcevHF-1V; Fri, 18 Sep 2020 18:55:30 +0200 (CEST) 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 287B31018B5; Fri, 18 Sep 2020 18:55:30 +0200 (CEST) From: Peter Hilber To: , CC: Rob Herring , , , , , , , , , Peter Hilber Subject: [RFC PATCH 4/7] firmware: arm_scmi: Add per message transport data Date: Fri, 18 Sep 2020 18:54:41 +0200 Message-ID: <20200918165441.256940-1-peter.hilber@opensynergy.com> In-Reply-To: <20200918162311.254564-1-peter.hilber@opensynergy.com> References: <20200918162311.254564-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: -4.09 / 15.00 / 15.00 X-Rspamd-Queue-Id: 8BABF100E7E X-Rspamd-UID: 9ae508 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 0f1540cb2d84..e3ccec954e93 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