Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp3333147rwo; Mon, 24 Jul 2023 09:26:58 -0700 (PDT) X-Google-Smtp-Source: APBJJlFt93s0Gdge4OOvzp0hZ+21wLyhGjiV76OGn5+EVMX9/LJi+c+KSY4/VC/03nXpg9DzM0kD X-Received: by 2002:a17:902:9a86:b0:1b9:e97f:38ac with SMTP id w6-20020a1709029a8600b001b9e97f38acmr7948433plp.56.1690216018400; Mon, 24 Jul 2023 09:26:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690216018; cv=pass; d=google.com; s=arc-20160816; b=q3MaQb2wzvu/mhf2UB+5gdt8HMVV9jdfa7Xs7txT0TIytKV87tWOk2qA+c8/VuGiBd VrtirE7OrLOwI/CF5c2d8QZRd+2EFhlhummA1nnTSG6saLSMtBotJlF9z+roOUpW8PlJ epMBYJvP2vcHckZOvujQV3VedfKm1nPZ40jI2Be6vT+XY5fo3Uvig8TyJJoIBeeS1y79 3FsqXDNEJ7zWhDVRPbmQ6PZ0s1M8ieOZPvFxg/MPdy4MfMlN4XlxXlNUyoz0ATqaN1FE NeVd7esR5Pj0uhBTKKaUKe9Vdm6B1GlTSFBAad5O6PdkuaN9fPTfz2mSRnx+HmPfGtIm KyqA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:content-language:references:cc:to:subject :user-agent:date:message-id:dkim-signature; bh=Gk9mh55Sl9sbldBM7gaz6MkYbcORqhg+mCpDBDqrFkA=; fh=rkia2OgZnT6LFc+njtozE9IScHynQPceFH/Q2zmzuUQ=; b=fJ8BESTJ10aBDOiRwaczzKzwo2KwBP7MrlsNUrfD/8P6ecDTWI5rKYFHC0xbVTkAaw /7rKrclFdAs7zIQWQnPInNmfJ2Fj/qy0McAholnh+xjwJ012PQtUC7yE7jTKKgN53wRf 2/r4gcvA+elboueZ8fWjc34pGXxqGl9ifj5I4hQt6dsJyXg/Q4tnvPZQeJo98eHikFFL j5azOpQ/6GwLK5UmtDtKC8VqagVfPjMGnca7A8uETEm88zL/OPcIYbHr1R7RhGdTEIvt GpBOVGqMKEhWtjAMz1ST6sS2UgfGeYQ7r0kK3LVEteDG3ZwigwAM898hK9ttPldY+BOu fEXw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=iCoTLidw; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m6-20020a170902db0600b001aadba392c1si10144035plx.464.2023.07.24.09.26.44; Mon, 24 Jul 2023 09:26:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=iCoTLidw; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230185AbjGXQEv (ORCPT + 99 others); Mon, 24 Jul 2023 12:04:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbjGXQEu (ORCPT ); Mon, 24 Jul 2023 12:04:50 -0400 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2081.outbound.protection.outlook.com [40.107.247.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A849B10DC; Mon, 24 Jul 2023 09:04:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BWBSqDyRDiHoXTCrga4Qw6S6CJLwC91TJeadxPc5in0UCyp6kExkO8rOERWlh7KsT7CKk8lfAWSZEvg/IPKx0oIQXmIng1tA2VJZR45h1iXb3sV7Aw2b/BCxN2jkrYxQpyGKVi/pUEoNjiKJD5xxqpp6hd1ixhXUSV50fR5nftyonZ3IXyd2zI8OqeKrwnsBd7ysoBk3jqD6SV9vQ7f6fCAOOEsHOBdY2J70FI1onVPjKmp1X/HpR26XGFXH/Qs+R3/UlB0oUB56esfiHT/Ei4iIWhXvIdBt+rGg3aBV1lMGM+O/k0W+vPiyngQKql9n+QoYtoJnhbE+spoSGzsIxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Gk9mh55Sl9sbldBM7gaz6MkYbcORqhg+mCpDBDqrFkA=; b=kG8pxFYm6P08t1sDHUvsS/nFofeeIiM9UPlYguK3mDJz4XRNCIKliw3gtAP+anQYS5hEpaNvE+lyJBmSyRN+uRHp85OrtsjV4nXom+kRy9eetWE0gSekhOlXqj8+PBK/925bsB/IUG9IgDOednG5Ezjjrn1Ak7dzTcOO+KLeg2d1r8cK7Spf2hTPbA3FUcg//1BnqdiscYjeeTImed35JxmKH64FrYXep5HpAlcq8WoqllnbtALZj7eH8B7j4vsYxUnpCjWvlYcpkGHkLmU2ZKksK2MO0+8AKwNoqPrzRgf+V6rxyAwcXAzY++HSnaKy06pAUXl41ho9h9ZT1diThA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Gk9mh55Sl9sbldBM7gaz6MkYbcORqhg+mCpDBDqrFkA=; b=iCoTLidwJkWLsvek22tyRbOe/SsoePzN8DeEcoBHnJqSIVAE1VZH5ovjyx0IDMUT3Vu+i3a5JfRj8ljWcVerVwHVUmUrpT8PLBnhX+FJ3tamlUapQCx2FGYsu8uFX4bjCGbhVOWV80kK8V7XQmI29cKkolUHwu5tFiqywQInWDQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DU2PR04MB8774.eurprd04.prod.outlook.com (2603:10a6:10:2e1::21) by DB9PR04MB8266.eurprd04.prod.outlook.com (2603:10a6:10:248::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.32; Mon, 24 Jul 2023 16:04:44 +0000 Received: from DU2PR04MB8774.eurprd04.prod.outlook.com ([fe80::d2eb:93a4:639a:99cf]) by DU2PR04MB8774.eurprd04.prod.outlook.com ([fe80::d2eb:93a4:639a:99cf%4]) with mapi id 15.20.6609.032; Mon, 24 Jul 2023 16:04:44 +0000 Message-ID: Date: Mon, 24 Jul 2023 19:04:41 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH 2/2] remoteproc: imx_dsp_rproc: add module parameter to ignore ready flag from remote processor To: Mathieu Poirier , "S.J. Wang" Cc: "Iuliana Prodan (OSS)" , Bjorn Andersson , Shawn Guo , Sascha Hauer , Fabio Estevam , Daniel Baluta , Mpuaudiosw , linux-imx , linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Pengutronix Kernel Team , LnxRevLi References: <20230712224251.26482-1-iuliana.prodan@oss.nxp.com> <6fe5691f-67f4-ff70-8350-b4b6c08097b0@nxp.com> <86da3550-9711-6714-0857-2f7611dc9453@nxp.com> Content-Language: en-US From: Iuliana Prodan In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: AS4P190CA0007.EURP190.PROD.OUTLOOK.COM (2603:10a6:20b:5de::6) To DU2PR04MB8774.eurprd04.prod.outlook.com (2603:10a6:10:2e1::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PR04MB8774:EE_|DB9PR04MB8266:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f6195df-782d-42a7-791c-08db8c5fb1fe X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vhhF+Ga3TPpgdM3sms2enARPeStFur/Xq8Bdh/QxOHFczAHFglaFSLWy1pv9KYZpfnFRnHurhSQ5Ci87kiMJ4XAXeZLlD4DYDTvFC6kL52cL2e206SJOhVB3aHQ1mn4/2Pj4lWGMx1ZniD8fxQ0ag4zdQDLt5aA7kVLvasp9ZYzhMJKBBnCLJCLvK8TiR17vRfNA5k41Af8h9MCL+0m9Gu6s3SJGzWur8fWZXCucQrFdMKTF5aoubIGMnTtEzc10M2WtHZEdVI9YtF9QGYiUcf8bD8bfgdx7f460oL9lwUEAr0pSXREBzcHb318PujKU9SDo2nrgo/GVOHJAuAqFkXbbnjvFkaGPXu1IoBAoySIx8FTn64szRsqOeCPnqIUW5wPp9BIkFjv0aTi0gjUJBS+DDyf57yo2wKCI0N8v0TcHQsbR3yCV6EKYKk+5kp+hgKFqPPOjGDyYZ4WGB380hGqcJxGP/cxIMGU37ZUZNQXgw8FciPVEnr7T9u9MN04xzso55zV0LrxX0y3jCWC6D47DLzDUzrrl02r8lA/Ldj3yltC5lgZAoChxswn5G55KgvJnJe1SyWM139sHW756kw8oHlMjccnjI8gkTP6v+AHzzYi/aF+5euXULBl7QGkhgn1i6jzP80PDppeSrIwiOg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU2PR04MB8774.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(346002)(366004)(376002)(39860400002)(136003)(396003)(451199021)(38100700002)(36756003)(53546011)(2616005)(83380400001)(44832011)(8676002)(8936002)(5660300002)(110136005)(478600001)(54906003)(6636002)(66556008)(316002)(4326008)(66946007)(41300700001)(26005)(186003)(6506007)(45080400002)(966005)(6486002)(6666004)(6512007)(66476007)(2906002)(31686004)(31696002)(86362001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?UFd6QWJFcS9EMktpOEkxVkx0azNRM0VITjNDTWJzeWZIbFk5WjNsU1o3L3pk?= =?utf-8?B?UnlMQXdzK3gxbllxNjZxanVkdVVKMkNwVFA4ZG9YaFljTVUyQ3JLTTI1NVBG?= =?utf-8?B?SlF0c3pVY3VqbTI2NCtQdkw1YVI4TDJrZ2JRSnFmQ2NDS1U2QVczSkhERHRO?= =?utf-8?B?LzhKNTJTTUpqMjFIV05BM2RPZE9CcW84ME4wQldQblBMNmRvbWJNU0NSRDc3?= =?utf-8?B?YllVb1I5SEIwcDkwb1NTVGFkRVErVWlTMWZxMHdFOWZ2Tzh1WUZMUFQ5UWtE?= =?utf-8?B?azJJVXRkQUF5N0hPSFRsbFptWks4UmIwUHJ4bFA1alpTc1F6MWF6em02TWJY?= =?utf-8?B?MTJtUXQvcjlBRzF1a1cvaHVzQnhUMXFMQXdJeU1FZ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1fe X-MS-Exchange-CrossTenant-AuthSource: DU2PR04MB8774.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2023 16:04:44.1834 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 8X+06AReyHX4rdcYH6KFB1bIlmEyTugwz3ITMogZX0ZICQQdpeP4WDSh35oo6z12L29XGNguKh2/VdcI4nXj8A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB8266 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/19/2023 6:47 PM, Mathieu Poirier wrote: > On Tue, Jul 18, 2023 at 07:44:49PM +0300, Iuliana Prodan wrote: >> On 7/18/2023 6:48 PM, Mathieu Poirier wrote: >>> On Tue, Jul 18, 2023 at 11:30:43AM +0300, Iuliana Prodan wrote: >>>> Hi Mathieu, >>>> >>>> On 7/17/2023 8:34 PM, Mathieu Poirier wrote: >>>>> Hi Iuliana, >>>>> >>>>> On Thu, Jul 13, 2023 at 01:42:51AM +0300, Iuliana Prodan (OSS) wrote: >>>>>> From: Iuliana Prodan >>>>>> >>>>>> There are cases when we want to test samples that do not >>>>>> reply with FW READY message, after fw is loaded and the >>>>>> remote processor started. >>>>> This seems like a bug to me - where is this FW comes from? >>>> The firmware is a generic sample from Zephyr repo: https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/subsys/ipc/openamp_rsc_table >>>> >>>> There is no bug, this is how the application was written. >>> But how did it ever worked before? >> It never worked on this kind of samples (and it was never tested like this). >> We used only applications written by us (NXP) with the >> requirements/limitations we know we have. >> Now, we want to use also generic firmware/samples (from Zephyr) and we face >> other kind of limitations. >> > Right, we can't expect firmware written for a totally different OS to work out > of the box on Linux, and vice versa. > >>> And how does having a module flag to >>> characterize each FW implementation that springs up in the field can scale (and >>> be maintainable)? >> I believe the FW_READY reply is a limitation introduced by imx_dsp_rproc. >> We cannot expect all firmware to give a FW_READY reply. >> So, to keep both usecases (internal firmware and generic sample) I added >> this flag. >> > What happens when a third, fourth and fifth protocol variation get introduced? > Adding flags just doesn't scale. > >>>> Rather than modifying a generic sample for i.MX usecase, I prefer doing an >>>> "insmod imx_dsp_rproc.ko ignore_dsp_ready=1" just for this sample. >>> We already have a "no_mailbox" flag for cases where the FW doesn't need to >>> communicate with the main processor. >> "no_mailbox" - no IPC between cores; >> "ignore_dsp_ready" - we have IPC between cores, but the remote processor >> doesn't send a fw_ready reply >> These two can be combine, but for "no_mailbox" will do some useless memory >> allocations. >> >> When I added the "no_mailbox" flag, the problem was still FW_READY. >>> What happens when some FW implementation >>> requires a three-way handshake? How many flags do we spin off? >>> >>> As I said above this approach is not sustainable. I suggest to either fix the >>> FW (it doesn't work with upstream in its present form anyway) or start using the >>> config space as described here [1] to dynamically probe the characteristics of >>> the FW being loaded. Whichever option you chose, the FW needs to be updated and >>> the former is a lot more simple. >> I don't think I can modify a generic sample, used on other targets to send a >> FW_READY reply. >> How will it be handled on other platforms, if their *_rproc are not >> expecting this kind of message? >> > The only way forward is to come up with a standard specification to describe the > protocol to use, the same way it is done for virtIO for example. But why was this FW_READY added in the first place? @S.J, can you, please, help here? What is the use case for this custom message? My proposal is to remove this reply. This was added for a custom firmware/sample, that is not publicly accessible  - S.J, please correct me if I'm wrong. Also, for imx_rproc (used for M4 or M7 secondary core) we don't have this FW_READY reply. >> Thanks, >> Iulia >> >>> Thanks, >>> Mathieu >>> >>> [1]. https://elixir.bootlin.com/linux/latest/source/include/linux/remoteproc.h#L298 >>> >>>> Thanks, >>>> Iulia >>>> >>>>>> In these cases, do not wait for a confirmation from the remote processor >>>>>> at start. >>>>>> >>>>>> Added "ignore_dsp_ready" flag while inserting the module to ignore >>>>>> remote processor reply after start. >>>>>> By default, this is off - do not ignore reply from rproc. >>>>>> >>>>>> Signed-off-by: Iuliana Prodan >>>>>> >>>>>> --- >>>>>> This was discovered while testing openamp_rsc_table sample from Zephyr >>>>>> repo (https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/subsys/ipc/openamp_rsc_table). >>>>>> >>>>>> We have IPC, but the remote proc doesn't send a FW_READY reply. >>>>>> --- >>>>>> drivers/remoteproc/imx_dsp_rproc.c | 15 +++++++++++++++ >>>>>> 1 file changed, 15 insertions(+) >>>>>> >>>>>> diff --git a/drivers/remoteproc/imx_dsp_rproc.c b/drivers/remoteproc/imx_dsp_rproc.c >>>>>> index b5634507d953..ed89de2f3b98 100644 >>>>>> --- a/drivers/remoteproc/imx_dsp_rproc.c >>>>>> +++ b/drivers/remoteproc/imx_dsp_rproc.c >>>>>> @@ -36,7 +36,13 @@ module_param_named(no_mailboxes, no_mailboxes, int, 0644); >>>>>> MODULE_PARM_DESC(no_mailboxes, >>>>>> "There is no mailbox between cores, so ignore remote proc reply after start, default is 0 (off)."); >>>>>> +static unsigned int imx_dsp_rproc_ignore_ready; >>>>>> +module_param_named(ignore_dsp_ready, imx_dsp_rproc_ignore_ready, int, 0644); >>>>>> +MODULE_PARM_DESC(ignore_dsp_ready, >>>>>> + "Ignore remote proc reply after start, default is 0 (off)."); >>>>>> + >>>>>> #define REMOTE_IS_READY BIT(0) >>>>>> +#define REMOTE_IGNORE_READY_REPLY BIT(1) >>>>>> #define REMOTE_READY_WAIT_MAX_RETRIES 500 >>>>>> /* att flags */ >>>>>> @@ -296,6 +302,12 @@ static int imx_dsp_rproc_ready(struct rproc *rproc) >>>>>> if (!priv->rxdb_ch) >>>>>> return 0; >>>>>> + /* >>>>>> + * FW_READY reply is optional/ignored, so don't wait for it. >>>>>> + */ >>>>>> + if (priv->flags & REMOTE_IGNORE_READY_REPLY) >>>>>> + return 0; >>>>>> + >>>>>> for (i = 0; i < REMOTE_READY_WAIT_MAX_RETRIES; i++) { >>>>>> if (priv->flags & REMOTE_IS_READY) >>>>>> return 0; >>>>>> @@ -1119,6 +1131,9 @@ static int imx_dsp_rproc_probe(struct platform_device *pdev) >>>>>> else >>>>>> imx_dsp_rproc_mbox_init = imx_dsp_rproc_mbox_alloc; >>>>>> + if (imx_dsp_rproc_ignore_ready) >>>>>> + priv->flags |= REMOTE_IGNORE_READY_REPLY; >>>>>> + >>>>>> dev_set_drvdata(dev, rproc); >>>>>> INIT_WORK(&priv->rproc_work, imx_dsp_rproc_vq_work); >>>>>> -- >>>>>> 2.17.1 >>>>>>