Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20486819rwd; Thu, 29 Jun 2023 03:02:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ72C2jSGNQlyXRnj3AnhiOKLt/4ztFWbZGFVgvZeiM1pE7rHWHhOb1bXXcalnKhvfR2XGZz X-Received: by 2002:a05:6a20:3d92:b0:12d:130c:3ee3 with SMTP id s18-20020a056a203d9200b0012d130c3ee3mr231975pzi.44.1688032940046; Thu, 29 Jun 2023 03:02:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1688032940; cv=pass; d=google.com; s=arc-20160816; b=BLVCP8roOlG251NLQ8wC496kHufs7P+aRohhq8Le1jjnE7uCQ38PmPuZMk/I++SpNI 6f4F6X3qFYP+MorTN3zVylY9j5AXMu/ET5EbCP/HBlSb2cXhrsG+UtO2YrHl3+M+zach cxAd/6mIf/7ucX5H6tViLnHd8jwZAM4cAEADlrrfD78s6kcpFoZXUFgOmXqEuoKd3+p4 I3ha/MsbD3HITQHPn22qvackBNu3d59bPFWMXNGt/sfr94+NKSHRTm9NlXRlcFXPWprp 7R1pBCtTgHIyTTlsk8OfBJqwihkErylWeQXvtLgnHsahD0/hamz6KuIY+ciVnWb12Ffz mVCw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=ufXtIx0oKtdXw6R5tdCkNrK3lRf8lKbSPLnFmjCzzQg=; fh=GDfxdgMni1jR3HOGMNW6bx5AwINrVarjx+3y/d2LH+M=; b=KVxktjQBKkzToSQE9mkn9X/RoqmoU+1Zu/1kftfzB3/1DceYQlC38RH4Jph2xTXsoj q1SQtHhQR4JR4OXmBl/GszPTDyMIzWFv9DkbHkam7QjYhs0u8HgYW+DTumFRFjx4LE6w OY6nIhPdBGMJ/T6hnulw9hRf2gdZRYKZOB3RaG0LoDrEzpGALjL8bqI+Invm2Zx3PT0S 3gVTO8asSExTbkRYRybdrcRxVO8uHntQH72AesyUWMO6HmT/2dCkJecvl65OnEllGO7Y J8q4ewC1vfvZ7MKOT3N/3DBACf91nsiKmYS6nR6aU2jjtouohPkR0AJT4pTpR+6hWuop yrEA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=S5qLd3M1; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.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=fail (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 y30-20020a634b1e000000b00534780446d9si10290617pga.640.2023.06.29.03.02.01; Thu, 29 Jun 2023 03:02:19 -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=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=S5qLd3M1; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231956AbjF2J3P (ORCPT + 99 others); Thu, 29 Jun 2023 05:29:15 -0400 Received: from mail-vi1eur02on2076.outbound.protection.outlook.com ([40.107.241.76]:16896 "EHLO EUR02-VI1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S232620AbjF2J2o (ORCPT ); Thu, 29 Jun 2023 05:28:44 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NfpINTAskcWNYfxqLJquRL0Cw5oyyf9Y8J0AUgxAC/BpSDIUwtIj0G4FK8DhidPTHwsTYBBck8VjsfeGjBvhd4arVk/c3HawY9Q7jCmrRXaRs+45X88EOrihbJct4jrHzCHYiXF0dhC1tzjh7zq5gBj8FJIaizy4iENWkSWDP8FCLBJnZi5DtzrQ06VX3wWGyjTgodUuZFpneynHQqtWlYoYG5sssoGd9L7lEPu/jhSLNtIeW+DBLQ/cfZ/eoMwoyQA1n7Gia0fWcGNVhrBVQvcvX5B2L+pWw5o2i5/rasU2VR9+hfYc4P3PsiJfG3SdvKPx6TrnyLb7vr11HBx0Bw== 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=ufXtIx0oKtdXw6R5tdCkNrK3lRf8lKbSPLnFmjCzzQg=; b=ZtF0XW04ocvhpcRf8FYpfPwkxNDMv9XMGkByDV0Gc67rrB6nAWOCTNyTOQkSHCnprbQmFTKz+sN2DD51XF18khIsmtm96CNpRivJeGuys1ZNDOFQkaBioXx9oQqYckKrHifJx0hyhmi2wMxp6YIFPpLPKxNHflUzhsYMw6+Uta+auwYnyXh/e/3fDVU2lQMGrLMOL/YVbUYRkn24yWOj5HQS+MlWrw8lQBdkZar5nwWCx4q8tWEpUHtpuqwB7eAQrhGm0h8hNbWvEwBasmebh5y2Lkm5TCzd4ayDoN/6q5/xhboemPIiXTp1H8Y8BSBezb9I3eDCr+UQ8e6+BuzJOA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ufXtIx0oKtdXw6R5tdCkNrK3lRf8lKbSPLnFmjCzzQg=; b=S5qLd3M1KCbW79WGJ45MXhdNQhaNWqnho5n+L3LpWyP2YYorSaMuKBj3C+lpMJ7bcFbTpmJ2pNJpqgMs6Z+mYBKnci0Tpf3GGNKL0tUolHroI7z47ou4EtY3eFp7R1xASFaW+HGbxMtxsKKZeFDJg/VTLc462nIHcNEHY1u9AU8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by AS8PR04MB7608.eurprd04.prod.outlook.com (2603:10a6:20b:293::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.26; Thu, 29 Jun 2023 09:28:40 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::efff:43d6:6f46:eea]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::efff:43d6:6f46:eea%7]) with mapi id 15.20.6521.026; Thu, 29 Jun 2023 09:28:40 +0000 From: "Peng Fan (OSS)" To: andersson@kernel.org, mathieu.poirier@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, daniel.baluta@nxp.com, iuliana.prodan@nxp.com Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan Subject: [PATCH V3] remoteproc: imx_rproc: iterate all notifiyids in rx callback Date: Thu, 29 Jun 2023 17:33:27 +0800 Message-Id: <20230629093327.3376308-1-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2PR02CA0009.apcprd02.prod.outlook.com (2603:1096:4:194::11) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|AS8PR04MB7608:EE_ X-MS-Office365-Filtering-Correlation-Id: 2746d1fa-7abf-490d-710e-08db78833967 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: f2+JRqeNkWjsL9PVYW8oT5uDSFcJyQzrleWcwtebIGyV1xlMKoZI119IHxS+CJ44aF5T+7HtpGsAuQjr/dU36f18wqLVkl+R95sv1b2kZJkyT/mb9Axtr+9gZQOA9LReGraz3cnA82unxORiOEwXzCBDgSAUwgfpL18QHcYCcbibWY7TOshPgeFsd4hYumZclB09Nklcm4hjklkcNUtkJ61r4Q61K0qBi7M8dP7gzVI9dbvZr+3P8ecvU0s5HKv35+ecf+BOwk6xlTjV5D9wKAFJxp40vSX//MtgAGANumKECe5lsxoN7+jt5sPiFJiNbJDRn66epUeQXysO4VaTCByP+Ev9Cari2fSlo5gMi0gZAwzZz1RhXwAgnEHakP8EKpZfdHfbrDv0u1nlTAYz2Ej2TNuRirkav4RvN5Cix9nHJtfJVO5ciQSgi55xqoWDPGwUjmVKXWkYFGAC12U63kKxniWtYy3xafVUr3FyqfJfapElQnKHm7bKUcTmpLeRTVq0LHyMbaXjyClVOuhHofscEKuQ2DBUBGQp7B6a/eOEh6fD1Xuh5QRvBRl3hkB5Qq1dB8xI5TQtc5Xe5CpM4L9/CST2rjtMrtSjWHDEclPRCBbn2vk4QjnPYBUk2jgX X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(136003)(39860400002)(376002)(366004)(346002)(451199021)(5660300002)(66946007)(66556008)(4326008)(66476007)(478600001)(316002)(8936002)(8676002)(2906002)(6512007)(6666004)(41300700001)(6486002)(52116002)(186003)(38350700002)(86362001)(6506007)(26005)(1076003)(2616005)(38100700002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?qJkQHKCxCKn9Mizxx1BFzzCcneE3Km1TPBEJ2ur8XOnaZPz4kfO9NVrH2U8R?= =?us-ascii?Q?H+eMkbzKd+db7B6EG+fqBK5ggbrxAkHkzWO5FCt1VRMhVNlVIyMHFpRL50xL?= =?us-ascii?Q?PxVow61ls41dXZ4YJZKwNbxfyr3KfSS259Dg8yi9qqh49A6iuCs2YVuQKAmo?= =?us-ascii?Q?+K1x3MVevAYLMFpNKIAxrNc7PDJCHek5uK8IEPPsr+DJforZOGWScNCorWIe?= =?us-ascii?Q?7c+o4c2dC3Pz/f2AXSs928LH48W0EPZ0wfivMo6DyS7HTgmAfQzeOyNo4fbA?= =?us-ascii?Q?1vNN/d3FHjtCbP+EAlpKR6VJBEg+x9bDxghPJQD2CyP7rgrGCleJUS3L+/XM?= =?us-ascii?Q?A+rVQOGz1zp2g6Gjayv5/UhJLaConFELrjtvdnx/BwmbX+ANEbryE+lL2Dh2?= =?us-ascii?Q?o2jqytijOozCbnDs9Fwa7/r2Rafw+C9Sz0py3bWaZoRN8gecYQ0cRQD7huTx?= =?us-ascii?Q?LrLS+9kTqHlHtolsgV2LahHPBHQUMxdPtnYErWi+bc3DfK6Hm0RewKvOIbjJ?= =?us-ascii?Q?erT0hJmTYb6a5ewJ63O0Dz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?us-ascii?Q?O2W/LCJ/gefQvByeL8n/hzwcCJ6gxT+NsPzMSwfRuAyRhSD6XvXxNYGZUZVX?= =?us-ascii?Q?XJD3DLYb5CBiMute/69Lylnuv/xxOrJgG932qXVnD9BjK1B+oxOw1Tzx6ri6?= =?us-ascii?Q?eC4NZ9NKxQIufiJRpYcH3iJEu7tTsdgvXC+4dS5v?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2746d1fa-7abf-490d-710e-08db78833967 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jun 2023 09:28:40.5445 (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: qB83yAdqQYbu9bMFTj0FNl1HceuREkdP4suu9CCYX5H2WUESyDHv1/p9ZUHKMXgrM6YeLA/g8GxN+CaD2OBPkA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7608 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Fan The current code only supports one vdev and a single callback, but there are cases need more vdevs. So iterate all notifyids to support more vdevs with the single callback. Signed-off-by: Peng Fan --- V3: Drop debug message in callback V2: Update commit log drivers/remoteproc/imx_rproc.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index f9874fc5a80f..986d3db81596 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -725,13 +725,22 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, return 0; } +static int imx_rproc_notified_idr_cb(int id, void *ptr, void *data) +{ + struct rproc *rproc = data; + + rproc_vq_interrupt(rproc, id); + + return 0; +} + static void imx_rproc_vq_work(struct work_struct *work) { struct imx_rproc *priv = container_of(work, struct imx_rproc, rproc_work); + struct rproc *rproc = priv->rproc; - rproc_vq_interrupt(priv->rproc, 0); - rproc_vq_interrupt(priv->rproc, 1); + idr_for_each(&rproc->notifyids, imx_rproc_notified_idr_cb, rproc); } static void imx_rproc_rx_callback(struct mbox_client *cl, void *msg) -- 2.37.1