Message ID | 20241204-ep-msi-v10-7-87c378dbcd6d@nxp.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2057.outbound.protection.outlook.com [40.107.247.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F3A5C20DD57 for <imx@lists.linux.dev>; Wed, 4 Dec 2024 23:26:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.57 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733354809; cv=fail; b=MgLFzhKIvoGRfJ9+i6T58DJthwEDGvI6U6g1GWDSrd9yRN2NmImU+GtdFsXU4P0vBmOyd9XHZFcBfNsg0zvg8lOMhcCzkCjodk2VGTJQ5w3/2MuNB3OBQxlfSeOlNbNN9Kudy4lEo1YhNhhayEfSvcmQi1IlUcDCwNQs2UU2Xr8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733354809; c=relaxed/simple; bh=S6bUkKC71zBJp7IHbO4GuG6uvgNe6M508NIE6GRsW9U=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=M5G5rNcX8gOG5S2HvKTLBpEdEAvRAOvXW+SVwRP1Uz7bAUY5+p3+LvLOmRID3EUE+XcIEupDDZ9uHZutRdfHm/PJySiINtnQi83UnerwAr4Z+n+115LCt0pU5YyyJ9PnOWEU8dsDioFKPSdFmRYDnu8AvrZp6d1dLAzhr1nKlFM= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=mFuJBvSg; arc=fail smtp.client-ip=40.107.247.57 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="mFuJBvSg" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=caMJczLnsUTAUiirobbhocAhN1XwLZLKJn1LJoaNVct9jXeebETNtopdgDmOC82vNiyatK/9EigJurlHhDIvyq2FXPXdhY6ag8ddkbqe1ZdFGCc12rvoWiAp7X5h4Syfg7uZIl/UeUeIEDzSkCYhy/wquLL2MCy7+6KAPRliFL9ZkgxCJCzRBfQo3zCV8C/tjnTcrPvUQs/1/dRXNdi+C3TlUeHEP+mzbPhmVyzUItkZpKn9MLTiIXml0y/bqmLZtU83VifglrV+KU75vYeYAtals0wl4uZHz6TXkhqhKk4aVdh9HVqTbQL+qeEwPljH+Q1Wz7KZfDGRv8WxwvLfjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=/Ys0D8TZScX3vVPXKbIFuvzXjgAAPGsX81zM8YBV0jM=; b=cejqwZFs463dNcGRmw/tnZ7GPIEiTtDnjISFCm9xR2SUphnjMbPUnNp35eUNdtlTb6Trt9q7jzG703TYz1JyckBXV1ufZ8L7rVMf/NOsk5i4trDOt9+hQ+Mw8/53wADPb7CBF1sKfMHXDRgncdMlYKwmkuckjgOF/VADb9G7rtAar8ZRjy4R16wdM9urUN9fSi6LiD4LqCbRa2G+0+DWRHoCEdQKz06tkczDZrnYc2rwZubWEaSxZcijrJIEgCylSZZt6zjG1JQ0o7FaVL7U/q+lctfAJ3WlPUGYyk49q12yXZOubt1c3zBnLC+MdFAMNpwJXgvPPvFq/YCKAqQXvg== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/Ys0D8TZScX3vVPXKbIFuvzXjgAAPGsX81zM8YBV0jM=; b=mFuJBvSgEi0F+ia2DIqDu5LMCTfuPaQWWpLUjxYe4P/W0ZIAp7R8FJWgNQgu77zqdqPKDAhbO/9jdPVqfRchX51tZ2HTvfwtIm/7QJ2l1s3kZpwBKT+4F/rtpDsN/Z6BHA7rWgfDs+/QFE+5qFOQaUOphkk3b9TmjCmrV77L/P/ISAUwte5KpFGmT2UDMBjyd03Hnsbfq2SRrWmXM8arf9m5S+zXETkIrdj/sHA9vfEtddzzuC2jUmYq6YjG38O3q4xmXjLb1bWQj5oDV8obnIBa/NdjJA+rM9gXMBYOMVScMIXHz9eABjOqjLarPcDhNm/W/wnDDJwnzv7Zrry11g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by DU4PR04MB11006.eurprd04.prod.outlook.com (2603:10a6:10:58a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.11; Wed, 4 Dec 2024 23:26:44 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%5]) with mapi id 15.20.8230.010; Wed, 4 Dec 2024 23:26:44 +0000 From: Frank Li <Frank.Li@nxp.com> Date: Wed, 04 Dec 2024 18:25:57 -0500 Subject: [PATCH v10 7/7] tools: PCI: Add 'B' option for test doorbell Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20241204-ep-msi-v10-7-87c378dbcd6d@nxp.com> References: <20241204-ep-msi-v10-0-87c378dbcd6d@nxp.com> In-Reply-To: <20241204-ep-msi-v10-0-87c378dbcd6d@nxp.com> To: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>, =?utf-8?q?Krzy?= =?utf-8?q?sztof_Wilczy=C5=84ski?= <kw@linux.com>, Kishon Vijay Abraham I <kishon@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>, Arnd Bergmann <arnd@arndb.de>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Anup Patel <apatel@ventanamicro.com>, Marc Zyngier <maz@kernel.org> Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, imx@lists.linux.dev, Niklas Cassel <cassel@kernel.org>, dlemoal@kernel.org, jdmason@kudzu.us, linux-arm-kernel@lists.infradead.org, Frank Li <Frank.Li@nxp.com> X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1733354770; l=1851; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=S6bUkKC71zBJp7IHbO4GuG6uvgNe6M508NIE6GRsW9U=; b=Av0cwUAZ3wAmQ8emQS5UbRcsGHW/DB1qBp2bj7ATNfb/vDkTin/deOgTOOxuGwL0vmvcfn5FE snon6iLIiUFAQIq+SR4H298z2XhbYkCkTIBmwu02Blx2C2Sde8unj/K X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR05CA0031.namprd05.prod.outlook.com (2603:10b6:a03:33f::6) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: <imx.lists.linux.dev> List-Subscribe: <mailto:imx+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:imx+unsubscribe@lists.linux.dev> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|DU4PR04MB11006:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a1e17f6-cb89-4185-b49d-08dd14bb1db2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|52116014|376014|7416014|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?1f1xDWlkUaVzx2FFLcDpFAqtLzj48rP?= =?utf-8?q?oUZPUW2i4oIpwFAJ7tWEo9/zncXzPqituIwVRvoU9PT7OlkN9/j0YdSnzrGw+zsVM?= =?utf-8?q?E3NWOXvB+5IO4mICsqsYiVlbeDDlt5VpNxU9GXs6d2NZG0hb0C0e9NX63PSis1ddq?= =?utf-8?q?CLoSmvqGEAHGKqTNREnIKisIsci+8WYY+DbUm04OoGFaWGmar2XGhIzyiQbd8J9qZ?= =?utf-8?q?CorDaOfxfrhQGaJfsRHEcqCva+xMX2+0Ub9kWxUOGcO5LmRkzHSa3q80oa/sK7e3t?= =?utf-8?q?RI3jvG2aMLb9/9MzOwVowqlH3h9AwPThXtq1IRlrzvk3fdJqFyaZadXR9YmfkAYKi?= =?utf-8?q?F9naAH202gMb9bTUHA+Jw0x0rXVIQeHc2xJai7ZaWTtDFFN1BZQL/jOgmC3JUeqdx?= =?utf-8?q?X/CFBP3OSzeIQXjOiT0cUZC36GUWj0kSVzeWsouwplbl3ZH7Ir/Kh8xC8D3GRulif?= =?utf-8?q?HoWUTil0lKc5byZ6J7Gih9myGPDkzkrcXAbwL1/pyZSLj+1FasCk6OA7iG3d5xCP5?= =?utf-8?q?NgEfpEqqYpqxgo0CAaeLXh53e/dRQ8IHw1p704ueu4TVDXTS2i9Vcr7uK3Wvv2iHp?= =?utf-8?q?XgZ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outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(52116014)(376014)(7416014)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?nis/UzwXS0BB0g0BE6DwC06MZJZv?= =?utf-8?q?exI77rIgMkqt9uuyDmbaGaWqaHC41dYKC8CLgZkFqNBe6MSXq4jt2wRwiGCJEjP24?= =?utf-8?q?OYTrWD1rl6a8iYVzzbGZ6AIai0wQq1gNQSWQRRBM98cYmtsaNKAgz+m7kMLOuOLMx?= =?utf-8?q?ZfBdM2UQtr83ixDsKJAxCzrCk4wRzuWUvscbS/p3Lidqd7MFKzoLxmf/im/wPkKuZ?= =?utf-8?q?ROxCzG1o26xU14BGZ4s3A+Bt/84aZfgdTx3LpR5nHESCt5jOOkeuuVkosX9feWZeh?= =?utf-8?q?eJZ05Bgu9fhqhkDrdq+kQanpRmPkxgkUW6em3bU/sIR2xzX5Hf1nbejagTN7TFjqk?= =?utf-8?q?XP3Wv420f0goUyNine6o5w5TyTVywZQxiVbGlpirKM4Hc06elqtYIasVjJ2Wl26OH?= =?utf-8?q?IRKvp/uvmnAjJuA4m/Bs8XcltaPLetoKl7FXOTSMXd0Uvo8VsbTrqK7sjl9PGSqFa?= =?utf-8?q?+oYABhjq1BqoLw4n6MpNaS3JAII5VLPCkRaQW/rxn6BLPehi7l8R/nCE+5WzBZ/Bn?= =?utf-8?q?A+ebVT4pmY4GxFoXBeZowuiGUJ/2GrVHeWi+TIvTfRql6TtUPQjOBljkkB1HXCA5+?= =?utf-8?q?z8BiTpprY1Hb6DWoL4EyTaaSKckml0HKveQ2o9Jv+iQee4Fb1EaIYr6vW8zqyMUR7?= =?utf-8?q?xfTp6DyQddQL4FO46FDG0nEkXHQR+cCF3UuFtCNUBDGkZQ6Z/cNl302d1ZU0hfwtI?= =?utf-8?q?jbM2mRumiCwUGEb4LOvlvexhRPeEfwwBw50yeMuEqhwWYLlkrw2Kxf4ZE5+19N2C8?= =?utf-8?q?d7J1J0OUZCQvXcHpkNvlRuDYUqOyBlEZkX7lmvD94bswGL5/4MzGQCd0SoP7zqgLJ?= =?utf-8?q?PGW5MYn7rFPYdBgqDdqes/e3LverE910whkrmhOQUGBxL2JRyoGnUFio3qb0nfF1M?= =?utf-8?q?68PuIqdXnCh2W/aiN2nwY8WlZka3j63cHDm+ZxHLAdBrO/O8MNkmoJTsAWTDjVQd8?= =?utf-8?q?TRY2qsNkkYoez44CdcmA3G5u0kOjElx6gIf8lyYBJKypCetpylRYPfy4dxeWu5URv?= =?utf-8?q?IXT8fbjqkFWLC9FUZztps0cOMk+KlD/HaYgDHmdkfVDlMm3MQWX5pLu9VBj815mCF?= =?utf-8?q?DrV2Ot9CXnKY9OTT/az9IsidcRom0dSuA9eRTOtx2DzW86TrocFdbo/B/MOdcQnFm?= =?utf-8?q?0yusoWqBSF4v85AIqlDoBKug+x9TIW02M4qtMI1u7JPAThga5hTsj4lgn++EuRTua?= =?utf-8?q?W43iNX3JoCo4SW4Y6SIpSaTsQHrpZ215YqPfGVkGownfV7dCBZG6EEmRxRndJbV72?= =?utf-8?q?Ofv2iTRTGvoua5tP9TkWE9RNBQo8sJgXfNT3C99LYblrJCItuKq+gwVzrdkuYV+17?= =?utf-8?q?+z2F7qtfn2etEN8bT1K6J4uj3ZR2d6RKyeI4mjVnSl/9PsAkPWrJkXOXGzQErhqBS?= =?utf-8?q?7JdZOjClHebbEFAEzzSkJxSEKUMGWn2Rlg71T4D1YbHc16bAunb8cW4cxa1ReGH9Y?= =?utf-8?q?A77PglgbZci3gPgZOVWC1DGIaTxaULlu8ZYkHRNDsIherP1KxQpdTMgI=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a1e17f6-cb89-4185-b49d-08dd14bb1db2 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Dec 2024 23:26:44.6967 (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: SkcPZyQLhaitxai/QZRCz1JwvR7AiGWruKLhexrHT3oy8vdo2Utsp+ye9vpg27p+Zsmi9wL/FIjKlbz+w0Mg/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU4PR04MB11006 |
Series |
PCI: EP: Add RC-to-EP doorbell with platform MSI controller
|
expand
|
diff --git a/tools/pci/pcitest.c b/tools/pci/pcitest.c index 7b530d838d408..fcff0224a3381 100644 --- a/tools/pci/pcitest.c +++ b/tools/pci/pcitest.c @@ -34,6 +34,7 @@ struct pci_test { bool copy; unsigned long size; bool use_dma; + bool doorbell; }; static int run_test(struct pci_test *test) @@ -147,6 +148,15 @@ static int run_test(struct pci_test *test) fprintf(stdout, "%s\n", result[ret]); } + if (test->doorbell) { + ret = ioctl(fd, PCITEST_DOORBELL, 0); + fprintf(stdout, "Ringing doorbell on the EP\t\t"); + if (ret < 0) + fprintf(stdout, "TEST FAILED\n"); + else + fprintf(stdout, "%s\n", result[ret]); + } + fflush(stdout); close(fd); return (ret < 0) ? ret : 1 - ret; /* return 0 if test succeeded */ @@ -172,7 +182,7 @@ int main(int argc, char **argv) /* set default endpoint device */ test->device = "/dev/pci-endpoint-test.0"; - while ((c = getopt(argc, argv, "D:b:m:x:i:deIlhrwcs:")) != EOF) + while ((c = getopt(argc, argv, "D:b:m:x:i:BdeIlhrwcs:")) != EOF) switch (c) { case 'D': test->device = optarg; @@ -222,6 +232,9 @@ int main(int argc, char **argv) case 'd': test->use_dma = true; continue; + case 'B': + test->doorbell = true; + continue; case 'h': default: usage: @@ -241,6 +254,7 @@ int main(int argc, char **argv) "\t-w Write buffer test\n" "\t-c Copy buffer test\n" "\t-s <size> Size of buffer {default: 100KB}\n" + "\t-B Doorbell test\n" "\t-h Print this help message\n", argv[0]); return -EINVAL;