From patchwork Tue Dec 3 20:36:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13892929 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2043.outbound.protection.outlook.com [40.107.21.43]) (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 19D8D1FBEA7; Tue, 3 Dec 2024 20:37:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.43 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733258235; cv=fail; b=L2NCHQ9eHXz3E72i1/yRAMsc3wsxVkTqM78MfaH67bTJKEXh5luGu+cSUWCRGFom8WEBMzU+QNwYixFomYV6q84bqtgedr8+coWHuXM7X+lrafr/Vr5IqwN+TpPXqxAK/hm6Ae0OevbKA9Y8/AstqJTz/QaaVE/1fEWSngKTdqs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733258235; c=relaxed/simple; bh=7/e6/0CXkB0mf+SY0mOWY+HgbTKlSQIetGfxHQ240Sk=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=FRCPHKPvf5kBywD091E2C0Jdi5Yg4EvtwcLdWRFePltD/dZHfJ7TjlhrGECYi1hd05Sbo/YgZO41oCAcbkBOS+dR78Z0LNtiJyvN4q0PbWOka7OadixlcTi4AotH3iQPQ9Qtyy+/ox1Y/1XzsJNli3s+8Ay8GRURykKur2kq+s4= 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=DmpoFpIQ; arc=fail smtp.client-ip=40.107.21.43 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="DmpoFpIQ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=tjFZVaSx9TU48r9VqsIzFJq1mwrd/RxpvpTb5BONOHlxkA0sJREB5btdKpXpRVk6A8fgs5ciuvW5YmS7NmcHigDkwKuXT23cgjv8sKgi+9g2R7prkWIr8QD1uI+5dvPBE/QcBC2jz0aIXxokgsh3tmz9OPICVNceBeot+/PNwy5uy3hCsklgqRNWR0umeQlzU8JTCy5CmCtGyyCJwsOhzJFXzVAdMVV+A9shbS39Ph9yoIKMsjvGPXju8exBc8MhRXW3jXesbKno4+kzIF6LwWpHmmpL/CWSrNJNbQO3OnaZeXf1x07OXic2GirUNV/FOomEN18RcehjRkbvOL+3sw== 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=JSYvUhgjSkj1P/Yyh0xabH6otNss+YN/Gpw3l4EzCJY=; b=wrVSGrJ2bzJ/taQXr3+80D51DIQes1dKulG1d/8soI/x++m8GKoe8Tajw0YBzzuuOYUVAdsJlU6ZvP2TlUavhuSSkeparycBLpw7gIax24D0ZUYFkZghVhT2UiyCdLEw6+jZje6GFUzOawwIeLEDpfogp+QFQ+DtzEfFa9Ch2SFDSXuvoxm1lgzKS4833OhgR3toSI1oxBJ78bydKVbunMWjbRMiHNguc5VzqOdQHZ1L4GsKWU8spI/2sijQDcf7MkSbZOJ8Yh7adMJuUz+08VpSUUB/H+HgOcWQsR4FmnSf+w0slNVf/4d+pQ9Q6scNXXHR9YKSt58bvJTcbrL2eQ== 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=JSYvUhgjSkj1P/Yyh0xabH6otNss+YN/Gpw3l4EzCJY=; b=DmpoFpIQgC1QAoY22/8rVYo7vMsHmYYABdnVCrqgvnQ0Pnh+2AzXGBuc7qlyUodTWTX15ZNlUlj2xGJbMsYw86vEfMyogWbn3nnOcU+o5W56T6lKUJ9cHw4NG5BbwyC3uf5wFctR1hFRu1yvWsKaqVzGtlMJCq1Mhv1nkmGYy/Ayfs6SEdKGJ0jo5Seb7GdFm/Hfuz1CKEA97FBc8EBxed2D9oWw2pNlewOB5LWjYsbiLkhRLtGRDSQme/offoNfgwg6+Cgerk+moB7lrCLEKgpl0+KXTfcYVYzcIlrnR3ifh54KbROctf+RNs89TKtBvw9v84PhbkTbMWLJMTyvMQ== 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 AM9PR04MB8730.eurprd04.prod.outlook.com (2603:10a6:20b:43d::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.10; Tue, 3 Dec 2024 20:37:09 +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.8207.017; Tue, 3 Dec 2024 20:37:09 +0000 From: Frank Li Subject: [PATCH v9 0/6] PCI: EP: Add RC-to-EP doorbell with platform MSI controller Date: Tue, 03 Dec 2024 15:36:49 -0500 Message-Id: <20241203-ep-msi-v9-0-a60dbc3f15dd@nxp.com> X-B4-Tracking: v=1; b=H4sIAOFrT2cC/13OTW7DIBCG4atErEvF8E9WvUeVBQzQsIhtmcpKF fnuIZFC7C6/Ec8rbqSmuaRKjocbmdNSahmHNtzHgeDZDz+Jltg24YxLYMBomuilFmqDRB+ECBA SaY+nOeVyfYa+T22fS/0d579ndxGP6yuhXolFUEYxRbTOg0bwX8N1+sTxQh6BRW6QgI5kQwZM9 Dw6F7jdI/VGwGxHqiEP0ilAFhkze6Q3CHhHuiGpsjOcJ4H83/fMFsmOTENRejTe5xA57pHdIt2 RbUhnyNrmHCGEN1rX9Q6oNpLeowEAAA== To: Manivannan Sadhasivam , =?utf-8?q?Krzy?= =?utf-8?q?sztof_Wilczy=C5=84ski?= , Kishon Vijay Abraham I , Bjorn Helgaas , Arnd Bergmann , Greg Kroah-Hartman , "Rafael J. Wysocki" , Thomas Gleixner , Anup Patel Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, imx@lists.linux.dev, Niklas Cassel , dlemoal@kernel.org, maz@kernel.org, jdmason@kudzu.us, Frank Li , stable@kernel.org X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1733258225; l=7426; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=7/e6/0CXkB0mf+SY0mOWY+HgbTKlSQIetGfxHQ240Sk=; b=eQW9eX+icDMuqAihu8dYnxVl/wSAswx08NFs6z9SJ6eBEoGES5UoyW7UtFNxkpxMXz/776Gko O1uXJQix/thAlPtMzv0amYMB3CvGYNbtgNPvV7clPuXg6l4OYqOi23k X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR05CA0013.namprd05.prod.outlook.com (2603:10b6:a03:c0::26) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AM9PR04MB8730:EE_ X-MS-Office365-Filtering-Correlation-Id: a79ce314-14e3-4047-3c85-08dd13da4246 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|376014|52116014|366016|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?NUbkFHqbjwvUVbc0RKeLuPh/pIgZEJM?= =?utf-8?q?htaeiLnjYChv/VXjrNca3epGj1OOWTsH9QQSXbsKFDCLi43AorHkhJ7eza8gzYnME?= =?utf-8?q?7dWZaVKRTQZRaOT2YiLEmGYA7BtossjwNaYXDq1fu1+7nS+GikrN+/ODW3ctEhbHs?= =?utf-8?q?h7Z0w2e+0oBCW3VzduQktYsLd6Tm7uKdRebXMWdOdgYJWQIZAR+uEuuua/9uiayVJ?= =?utf-8?q?cDY8PFTB91DL42YV1apV4RT4m67Mc0x7QLgoBENRuOkZ56/YfLUgg9gHAWgS42p55?= =?utf-8?q?rL1el3pBLCpEIV7o8Dm4NPPgsyAZsUVdCr1rIffdjbI5f8QKGTykuvhWWAxXb/1ty?= =?utf-8?q?isiowiMUYvhtqH2rQa5XZ09AvYu6hiG151+eEqi6sDAaFGbxH5GHeR1rOdEDulkoc?= =?utf-8?q?K3tupdPRYoQcmlY2FAeNBYZEGAe4HKUy0W3GGF5Qs+ixXOu15FVK5YS8LKi46jXIP?= =?utf-8?q?aLTL97IQn1xVGvLXgQzLxtLSnnZcXlNTdoYm+OizbB+1FXhmlgN+Y+N61Ik30f4Iu?= =?utf-8?q?7uCDjsefXb9D0g+9t1sj7BcoXfL93W4lnFwdyRxOpahKEv2SzfG65HGkSxcZqIL5y?= =?utf-8?q?YQDmOBV5G0zSNG8ZhyhB5JTYgb2suIIeVXS9QmyKhEs2oiU9hOy0oi35V5LafEJAT?= =?utf-8?q?FunfL01VI0M1sEjZ8kmFs59aOqF7ufQ4uxBNY2srbX8SHAwt/nMiaIhKQhkhLNOq0?= =?utf-8?q?tklOf8etj40gImmwKWrUFpV2t3cq0gxsVg5/6oFg8QQ9IcIsOKhZ9sbx39BYrC2/D?= =?utf-8?q?fj8PrUuG5JHpdWQhSQGRYrX9kmg7OFvnR6jRodQXLNrrHlJRpzgMA0Cub8J998ZrB?= =?utf-8?q?u3U46mitbabw+9R8lgOOQnXSw0QYVoOL69pEWtRWFK3jI8md0vmtIvKXM/hPB4rMH?= =?utf-8?q?lhCo3ue9BRCP2g7sWj42i/Mr8YIncuMktFNjVRuoTZ7I5Dj1cXMkmQjzrZYSFTZ/o?= =?utf-8?q?YZy2MrLYWtFc7POa/gskhNQOXc1+bk9OuCh2atDmIJXPeETv5QrnhAJxcNcbDqudf?= =?utf-8?q?AYzTuFYm6DrSN+egM58hBNCqWPR2OYqgiMeJZtHmlElyL1rDeDRn85B3RjXiRdrH3?= =?utf-8?q?hIhrSMx7d8m4t6hAeIYYI9oiC5dOjWoQ+y8GTUiSUb5mKqzsfdwd+OL2F12OglFt3?= =?utf-8?q?UE6XeKVlYwxGjAmqnznsT2P8ZC5r81rE3hepS6SYka9Rw53SrxI7vsZdTvvC+EkR9?= =?utf-8?q?tI3unuVSZQahKPcDYC0MzUmQXts7iVpHt3F5A2jtSpDv6d5AYW5WCAdulrJjqfo7n?= =?utf-8?q?1zp8JbwgBgCepfqsFQIKGnaoZ8yo1HQOXQTco5zanNjztWq/m+Tip71HyCfFOxlMl?= =?utf-8?q?wT52ftCSEgL0gpEVQCYkkXY28+DO/j01bg=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(7416014)(376014)(52116014)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?e2Oc9RyYGeqQTT5bcjdnXivQRvPd?= =?utf-8?q?FaLb3OicWoLcawVE3CqUVyxmpHCbi3Ki4VqLXC87V4xxGEOPtNs16cF3E8dbPC2Vs?= =?utf-8?q?pOCjrw4IBNSq2Mtf+1Kd6crpB0fIbYKHtHh/qKdfUfy91gGZFLWAth9P2tUJe84oe?= =?utf-8?q?NlrVtHTle4JHWN0SIVEsOjaZE1XFxiq4tNFIfTqwNpSZD62KP8BTBGP183SDmd/fj?= =?utf-8?q?0B7wmfHXaxKILUl9d4JQwr5hOLffMipNMgXGRhE72hVcfqmItJtoorb2aa4l7SF8f?= =?utf-8?q?relCCmn4iAi2arFfJX81fAPEXlTW32ErsUawEvD8E9iTnMEN8+HEG58NosuFSeBks?= =?utf-8?q?onbH+7Jb5jxp6bIcoO2w/dtrHFSkfckBKl+21wZIF7WpV51fvs7GklszITGo7dSDY?= =?utf-8?q?vBhU7l+9Y8SQbuEnyM1SDb4y/vW+kPT9dDxp02kRiJ4PEvdGSnrNsjjGQ7+GZEiIK?= =?utf-8?q?12k8l+Y6Pr/z0t8kXdy2a7Hz8BDySZ3l+S/iB2YMu5TIHnvbLFjD8JPhdZecVtwa6?= =?utf-8?q?v3duDWRDOQpGN9es7yqM6bJmrFPL0g+/+UZRBYWrf3nQDJ6meu6n0d0NybRuxtrC0?= =?utf-8?q?SgjLVu4eY0uDfETK3NZmULeRFVLcxsK4ivhblBgUW7xtVSeya7jq4F8dQ9nnqAt4A?= =?utf-8?q?oR3WCfdThIzRN2Ps4JHz+0o7my901BqfVOaLifKkvfUbvDwX3HK92Q66/vm/AeLUy?= =?utf-8?q?B+S7VrdFbpSe7/YoUPCeUfQkaVOoUTomM0WFOcWeEE+/KjDX6qjCATuDPPPBQwTAq?= =?utf-8?q?aJVa48uKrv/BC28bYE8NcqaYYnzpOBTuKz4/WGaZ2wzXxzpXdZ+HZaXnxsM4+vgVH?= =?utf-8?q?Ds7+U5luv6+oRJbkLbdtwko+ttIpGdJWLC1grCj8WLZTww60lsKgg8Lhruy/sGpTX?= =?utf-8?q?MDe+LqfC/kQNtrwObdL49OY7raknlsOEtZV5fWUXow1Bz/ke5qbYOQx0jLTaw5k2v?= =?utf-8?q?Y07OY+9GzV83PAJHfc4EV50WfZAvn6t/hIwt8agjFMtw5z0gDtyG24NO9BlnK8DWf?= =?utf-8?q?nubAd6unvljY0cUzEpBCMh1VKKykcyeZOgbLwakUHDFC03b5QlPODK7FekSNxjkYC?= =?utf-8?q?QWTMbZLQc0g2S4vUS+2GqNE9Bh6jFhcMDiFx/kdeA8xd7oDjOOAMF71r1Acp2qvOJ?= =?utf-8?q?J5bfGeo3Ny9jA1W5a2nQVqrt+nz1yMs20PKTmSNWyL9YyJIYl9xNEBGnmR5uPdrUf?= =?utf-8?q?poHWmH8srNIRfhnYixXzb9hS0YmJLEzewN85yyg4LK3Hp1LsKYd3IBVTSv5mCJNZp?= =?utf-8?q?phQnSLNjcfx34foDyw96/AxotTQd94Z32joYdE752I6e/0RIUpxCfwJBmnhT26WHq?= =?utf-8?q?5d7Bh1u4ADD5kf+SerBHS7bRV06vvbSs+tSBhuB+1m0Yb2yRMgNVILl10slHHZ2xl?= =?utf-8?q?HRlMTTssrn5OeNdCs6mFzpVqLTWIfS+IF9c6c63f43H0qXQ2QJwqM7Ib1TgBuJ7++?= =?utf-8?q?8ab/PetwDWbp8dOBXBqCYzErY1yNnAB6x2gTu5nb0NDkMYo348PIMgLA=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a79ce314-14e3-4047-3c85-08dd13da4246 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Dec 2024 20:37:09.3380 (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: rhm+BN8cycLenp54t1TI9yRnntX+aYB1bkTuqWnk5GQ7YT1tnJLQyzgUXpg2ApI3UGXTR3sigPXhA2maTl4oMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8730 ┌────────────┐ ┌───────────────────────────────────┐ ┌────────────────┐ │ │ │ │ │ │ │ │ │ PCI Endpoint │ │ PCI Host │ │ │ │ │ │ │ │ │◄──┤ 1.platform_msi_domain_alloc_irqs()│ │ │ │ │ │ │ │ │ │ MSI ├──►│ 2.write_msi_msg() ├──►├─BAR │ │ Controller │ │ update doorbell register address│ │ │ │ │ │ for BAR │ │ │ │ │ │ │ │ 3. Write BAR│ │ │◄──┼───────────────────────────────────┼───┤ │ │ │ │ │ │ │ │ ├──►│ 4.Irq Handle │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ └────────────┘ └───────────────────────────────────┘ └────────────────┘ This patches based on old https://lore.kernel.org/imx/20221124055036.1630573-1-Frank.Li@nxp.com/ Original patch only target to vntb driver. But actually it is common method. This patches add new API to pci-epf-core, so any EP driver can use it. Previous v2 discussion here. https://lore.kernel.org/imx/20230911220920.1817033-1-Frank.Li@nxp.com/ Changes in v9 - Add patch platform-msi: Add msi_remove_device_irq_domain() in platform_device_msi_free_irqs_all() - Remove patch PCI: endpoint: Add pci_epc_get_fn() API for customizable filtering - Remove API pci_epf_align_inbound_addr_lo_hi - Move doorbell_alloc in to doorbell_enable function. - Link to v8: https://lore.kernel.org/r/20241116-ep-msi-v8-0-6f1f68ffd1bb@nxp.com Changes in v8: - update helper function name to pci_epf_align_inbound_addr() - Link to v7: https://lore.kernel.org/r/20241114-ep-msi-v7-0-d4ac7aafbd2c@nxp.com Changes in v7: - Add helper function pci_epf_align_addr(); - Link to v6: https://lore.kernel.org/r/20241112-ep-msi-v6-0-45f9722e3c2a@nxp.com Changes in v6: - change doorbell_addr to doorbell_offset - use round_down() - add Niklas's test by tag - rebase to pci/endpoint - Link to v5: https://lore.kernel.org/r/20241108-ep-msi-v5-0-a14951c0d007@nxp.com Changes in v5: - Move request_irq to epf test function driver for more flexiable user case - Add fixed size bar handler - Some minor improvememtn to see each patches's changelog. - Link to v4: https://lore.kernel.org/r/20241031-ep-msi-v4-0-717da2d99b28@nxp.com Changes in v4: - Remove patch genirq/msi: Add cleanup guard define for msi_lock_descs()/msi_unlock_descs() - Use new method to avoid compatible problem. Add new command DOORBELL_ENABLE and DOORBELL_DISABLE. pcitest -B send DOORBELL_ENABLE first, EP test function driver try to remap one of BAR_N (except test register bar) to ITS MSI MMIO space. Old driver don't support new command, so failure return, not side effect. After test, DOORBELL_DISABLE command send out to recover original map, so pcitest bar test can pass as normal. - Other detail change see each patches's change log - Link to v3: https://lore.kernel.org/r/20241015-ep-msi-v3-0-cedc89a16c1a@nxp.com Change from v2 to v3 - Fixed manivannan's comments - Move common part to pci-ep-msi.c and pci-ep-msi.h - rebase to 6.12-rc1 - use RevID to distingiush old version mkdir /sys/kernel/config/pci_ep/functions/pci_epf_test/func1 echo 16 > /sys/kernel/config/pci_ep/functions/pci_epf_test/func1/msi_interrupts echo 0x080c > /sys/kernel/config/pci_ep/functions/pci_epf_test/func1/deviceid echo 0x1957 > /sys/kernel/config/pci_ep/functions/pci_epf_test/func1/vendorid echo 1 > /sys/kernel/config/pci_ep/functions/pci_epf_test/func1/revid ^^^^^^ to enable platform msi support. ln -s /sys/kernel/config/pci_ep/functions/pci_epf_test/func1 /sys/kernel/config/pci_ep/controllers/4c380000.pcie-ep - use new device ID, which identify support doorbell to avoid broken compatility. Enable doorbell support only for PCI_DEVICE_ID_IMX8_DB, while other devices keep the same behavior as before. EP side RC with old driver RC with new driver PCI_DEVICE_ID_IMX8_DB no probe doorbell enabled Other device ID doorbell disabled* doorbell disabled* * Behavior remains unchanged. Change from v1 to v2 - Add missed patch for endpont/pci-epf-test.c - Move alloc and free to epc driver from epf. - Provide general help function for EPC driver to alloc platform msi irq. - Fixed manivannan's comments. To: Manivannan Sadhasivam To: Krzysztof Wilczyński To: Kishon Vijay Abraham I To: Bjorn Helgaas To: Arnd Bergmann To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org Cc: linux-pci@vger.kernel.org Cc: imx@lists.linux.dev Cc: Niklas Cassel Cc: cassel@kernel.org Cc: dlemoal@kernel.org Cc: maz@kernel.org Cc: jdmason@kudzu.us To: Rafael J. Wysocki To: Thomas Gleixner To: Anup Patel To: Kishon Vijay Abraham I Signed-off-by: Frank Li --- Frank Li (6): platform-msi: Add msi_remove_device_irq_domain() in platform_device_msi_free_irqs_all() PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller PCI: endpoint: Add pci_epf_align_inbound_addr() helper for address alignment PCI: endpoint: pci-epf-test: Add doorbell test support misc: pci_endpoint_test: Add doorbell test case tools: PCI: Add 'B' option for test doorbell drivers/base/platform-msi.c | 1 + drivers/misc/pci_endpoint_test.c | 80 ++++++++++++++++ drivers/pci/endpoint/Makefile | 2 +- drivers/pci/endpoint/functions/pci-epf-test.c | 132 ++++++++++++++++++++++++++ drivers/pci/endpoint/pci-ep-msi.c | 106 +++++++++++++++++++++ drivers/pci/endpoint/pci-epf-core.c | 44 +++++++++ include/linux/pci-ep-msi.h | 15 +++ include/linux/pci-epf.h | 19 ++++ include/uapi/linux/pcitest.h | 1 + tools/pci/pcitest.c | 16 +++- 10 files changed, 414 insertions(+), 2 deletions(-) --- base-commit: 0b020199675f5fcb4df1120c33d01dc6e18ff8ae change-id: 20241010-ep-msi-8b4cab33b1be Best regards, --- Frank Li