Message ID | 20250207-ep-msi-v14-0-9671b136f2b8@nxp.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2C5A8C02196 for <linux-arm-kernel@archiver.kernel.org>; Fri, 7 Feb 2025 19:41:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: Content-Transfer-Encoding:Content-Type:Message-Id:Date:Subject:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=iiFaYVYQRnRv0nQVTAjUhbDNbOp/ElHchUF1907w52g=; b=j4bMp21nUhnPP5OSrdzxgUgzCR CZOVIBlLMtni3eO/z3msdGZidZRiFx3x54X6xEkDizFaQpkbZOWbE+6Xf4KmGTgfimhW5UaGhHef5 quKaRq0hLNf0CD6qZq3VHSZUkIJghQi4o38Z0MTDE/b/ms7Ews3nYMClKvldtATzB8h4BrriTbjdE DKc7WQasRzwwXl2BQ7AJFeY4cT8fYvxnzsx9xt0DAqvB2eysH9+z3FI+YtMApJqbDkRio7H8V795l RnB/JjOIqKCl9A2YRpl3mEaYfL9XSq3FS/y1pPv7vI7f6neJ+t6g2NTjkbnzcv+9Rl+/l8Kt7KLlf DRtif7zQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tgUEQ-0000000AwPe-26mz; Fri, 07 Feb 2025 19:41:42 +0000 Received: from mail-am6eur05on2062c.outbound.protection.outlook.com ([2a01:111:f403:2612::62c] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tgUD1-0000000Avw1-0tlz for linux-arm-kernel@lists.infradead.org; Fri, 07 Feb 2025 19:40:16 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xU8LVMANY0QOI68dH8MxsLWKouO6g/H8r1QqCmUVaifunbmHmEh9xXbJNeMG5UP7Rn+GZjT4pvMIHuBJDxTbhPVOztjU8XoYRFcOLZ5ThIOWiW2kZhrC4F3ZTxSGBJgWxiMNfuDkV4B9dCJ/GQZ4ql2+Fi4Y88+jiEWUtbKFhIG7tU16iSG56Qnpot5BcAVOatgKkhHxCQG9BJ2aBw9xfTnrLbqbIdmpmtLRc90P8O5RoInq6A3luR+a61VMfSHkgF5/0xyX4bT5dclkvBAooUEqWkJwXKK1Gf64az7Mofz+KoNKvnxPDEEja0j4XOqtvBKxv7tv5m/99SsxBVLPfg== 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=iiFaYVYQRnRv0nQVTAjUhbDNbOp/ElHchUF1907w52g=; b=s0nkmS/mF8SVXYpnUi0KAZC1h379k3LwXGwjgiS3DtfOa99iX+BtGwTxLycH66XU7EKMcZJSXsuH6r5p/duTHjKVZkyLrrG4KzHI4D190BxA4gwPbmuiB9m48aRTv4tLqevqfFRGAnFBczrsoaLQgJnMSh1zr6rlfFdS7kOaU2wPMXjw/NLDLINosAKemtfxlu7VCMYD4K6tfI7AntRc3s0KKMbNPXyZt+d3y7f6TDtkjceGo0R6WkqqAY8hnrQUX3YReeoE6/Q4rncNk6dvzW7ANJv4kJGDikwQBRGhNaQFjV6uuBsQMyy0eUIvXT48ZHI+4JjyUHu0UlDFDzl50A== 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=iiFaYVYQRnRv0nQVTAjUhbDNbOp/ElHchUF1907w52g=; b=XZQliQKrx6jBZQmKY0FK44lrNeua2S8NNajVKgW4+ai19pzAniQqb7AAIgOYbZl3oasWTDysqN26M4V2WS+Yc13nni8LEBKTIMZ3kIlGLWlpDOk2gCBRSHMtkcU3xAqUMJ+z2kb9JoBAlG+eWVDdlBYKTaW7a4URUTQfMwHFB9qTe0zveRB3zjDi6dpVS+oh4QAQVDTrpakmo2SGxgm4ml5OBwxbtZJ5Cd1YspX/XC1FI7dgeNVhkuMjcA1ORq9hl6zjXshCNkNLYILWV8URL7hDzksFRHaS7azKJlsbz6J/S3/7BVx/ANbZLZ+GgfqysdK8q8MnzC7/Jfb3Nr2fCA== 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 VI1PR04MB9787.eurprd04.prod.outlook.com (2603:10a6:800:1d8::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8422.14; Fri, 7 Feb 2025 19:40:10 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%6]) with mapi id 15.20.8422.012; Fri, 7 Feb 2025 19:40:10 +0000 From: Frank Li <Frank.Li@nxp.com> Subject: [PATCH v14 00/15] PCI: EP: Add RC-to-EP doorbell with platform MSI controller Date: Fri, 07 Feb 2025 14:39:42 -0500 Message-Id: <20250207-ep-msi-v14-0-9671b136f2b8@nxp.com> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIAH5hpmcC/13SSW7DMAwF0KsEWleFSGrsqvcoutDYeJEBdmGkC HL3ygFiyV6K0PugSN3ZlMchT+zjcGdjnodpuJzrAeTbgcWjP/9kPqRaYChQggDB85WfpoHbIKM PRAFCZvXydcxluD2Tvr7r+ThMv5fx7xk801J9RahXxExc8JhTtM6DjuA/z7fre7yc2BIwyw4Rr EhWZMAkj8m5gHaLVEMg7IpURR6kUxBFEsJske4Q4Ip0RVIVZxAzRdy1Z3okV2QqStJH430JCeM W2R7pFdmKdIGibSkJQtgi1xAKWpFb3qRFCpEKqJS2CESvWn91g4JbE8nYKpPeM+iZawyWsUuSx VtyJuwZdgzasuo0BSdKUhEWr1DsGPWsrQuWn6GlzggOU0TZ2OPx+AfMHd+wtQIAAA== To: Kishon Vijay Abraham I <kishon@kernel.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Anup Patel <apatel@ventanamicro.com>, Kishon Vijay Abraham I <kishon@kernel.org>, Marc Zyngier <maz@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Rafael J. Wysocki" <rafael@kernel.org>, Danilo Krummrich <dakr@kernel.org>, Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>, =?utf-8?q?Krzysz?= =?utf-8?q?tof_Wilczy=C5=84ski?= <kw@linux.com>, Kishon Vijay Abraham I <kishon@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>, Arnd Bergmann <arnd@arndb.de>, Shuah Khan <shuah@kernel.org>, Richard Zhu <hongxing.zhu@nxp.com>, Lucas Stach <l.stach@pengutronix.de>, Lorenzo Pieralisi <lpieralisi@kernel.org>, Rob Herring <robh@kernel.org>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org> Cc: Niklas Cassel <cassel@kernel.org>, dlemoal@kernel.org, jdmason@kudzu.us, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, linux-kselftest@vger.kernel.org, imx@lists.linux.dev, devicetree@vger.kernel.org, Frank Li <Frank.Li@nxp.com> X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1738957203; l=10660; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=+oxXXUJIJNBgPkCnbKE0lvq0c0/lh3WWynbE4q2NmCM=; b=iyDP5w4txkRdjPaGBUIaEUk+gyvXluNTMjb5DuxtLPToS0vMcvwdlDHVPiKqxpGs3jyKuVnzh e75Eow+LwnLAjVoTUo4TbxTfsTNyEbEVNs6K8os8lTwnlsN/JD/7Aa1 X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0P220CA0004.NAMP220.PROD.OUTLOOK.COM (2603:10b6:a03:41b::9) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|VI1PR04MB9787:EE_ X-MS-Office365-Filtering-Correlation-Id: 6bfcdc2c-8bf5-426a-5dd7-08dd47af3be7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|7416014|366016|376014|52116014|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf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um3YLuLsWKVRVylnJeYj1XrBnxdcI?= =?utf-8?q?URoj6Eh698ubPb+5N4StAr/2h4urgW1UDjjKxsjMqcAvhUpjhfkNp4anC3xh1lyCK?= =?utf-8?q?Uw7ymBXtWDwfADptyzGzxlbiMZKxtP6ZHtvXsUp4PXsBPfShRTwp41/qY2xvo5iTh?= =?utf-8?q?QizyKPLXxyKvhgTA60xOq5LiEaV2pJkzAXoJrB4/8PMXNpsHtoGtu8KwwVLTT8ir8?= =?utf-8?q?Aj6DejGZr+0DaWdQWsXdvFMZxylMnE2Ih3umMuPKFhVrLm4uZP2CEMuK/T3rZvK7w?= =?utf-8?q?aNgXoZlCSQv9WXc7rG/gLbQ2DNaDcDGtR5T6FMOCVP7DlNuOLGVZ3QdUfwA2ziqWf?= =?utf-8?q?PMAp69rU7tDeEdgFm3gFb9UVzS33pfcXiO49xD29G4KdSGxFLA7IjBhT2fjAJj7iQ?= =?utf-8?q?4WhB20L11yzU0h4VBsGw3cydHjm0WF84N70gnIZbkg7FN668iwgiFIP1vS0flWDyc?= =?utf-8?q?fRhVx243o2sDd0EG5qQyeZExQbiKc95DH+si2Z+zOGX9Xum/3ubrGHcwfSVOJq9lJ?= =?utf-8?q?ZPvmaaGPesKBlJMfMxPOURI2WJ/A9VUug=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)(366016)(376014)(52116014)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?7gPGPo0nUVmHaJc7Wc3+zKpsw2Ks?= =?utf-8?q?L9rgijDPyCJxPsFDZ5UNRx0FhudDB8CEhKTrS51jxIr7S4YEj1NtGf7rA4Rj/gXoa?= =?utf-8?q?5+ITU9+2I89ADE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VK6/S4vnIY/GLTxRxW8DWdq9V4TXS0XFqv4NZPy4ew90tHH?= =?utf-8?q?u4TVYJQwkmMmADVPH3iOIH3tDSYGpDzVvNzQuKf17sx0qoK/OOqi+G5J+H2iGZd7e?= =?utf-8?q?kSCIKoAOcPZvJAJWJnGdR2g5m6Ph5lNzxjR7dvS5VAdbSgbWwcGR7ySOQzQLDiDlu?= =?utf-8?q?BPPwBBbuT3p6modLINDOyD9mBjyVpr2VdqQHlizi3vMM8xoY8vShdgZETLun2jxTO?= =?utf-8?q?T64AmcggwvE6uWHg0ai6dLL8zXJTf430u9W4axWgA/N8fr4fAN2I/nX9CcLu8ook8?= =?utf-8?q?1S7VRdbAm18zqJDk1CT6U2K0ANED8t5gEKyve3BXJpht6rBUpTc+d1n/NVBIZXv2l?= =?utf-8?q?Mxp1qXGJLeMDm9sbqIVe3RBQmBae5tcdcQDJkGyxhcPph5yHr9oh6f7kTa9pmWj6G?= =?utf-8?q?mGA2GOC6X0Zt5fZt2mfDS6j44XZEqraVczztWRHi7w1gyY0gS+o+IXt9iCOevn8Br?= =?utf-8?q?RL9Y+MabBUxAeqTLFzjEzw1Z92xPq9WYEzk1KV//8QDCjW0fwAzoQ0hY6NwevmXYU?= =?utf-8?q?FymQ7mEJGKE+?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6bfcdc2c-8bf5-426a-5dd7-08dd47af3be7 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Feb 2025 19:40:10.7696 (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: rboelwollwFI3TdzM4JIgwcNBeYKgRyXkSVEOGflDIuZnTCx2glSIrMH/f4OJh58YjhdzcYIILvx342uFPw+5A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB9787 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250207_114015_435251_D3E06778 X-CRM114-Status: GOOD ( 11.96 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
PCI: EP: Add RC-to-EP doorbell with platform MSI controller
|
expand
|
┌────────────┐ ┌───────────────────────────────────┐ ┌────────────────┐ │ │ │ │ │ │ │ │ │ PCI Endpoint │ │ PCI Host │ │ │ │ │ │ │ │ │◄──┤ 1.platform_msi_domain_alloc_irqs()│ │ │ │ │ │ │ │ │ │ MSI ├──►│ 2.write_msi_msg() ├──►├─BAR<n> │ │ Controller │ │ update doorbell register address│ │ │ │ │ │ for BAR │ │ │ │ │ │ │ │ 3. Write BAR<n>│ │ │◄──┼───────────────────────────────────┼───┤ │ │ │ │ │ │ │ │ ├──►│ 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 v14: Marc Zyngier raised concerns about adding DOMAIN_BUS_DEVICE_PCI_EP_MSI. As a result, the approach has been reverted to the v9 method. However, there are several improvements: MSI now supports msi-map in addition to msi-parent. - The struct device: id is used as the endpoint function (EPF) device identity to map to the stream ID (sideband information). - The EPC device tree source (DTS) utilizes msi-map to provide such information. - The EPF device's of_node is set to the EPC controller’s node. This approach is commonly used for multi-function device (MFD) platform child devices, allowing them to inherit properties from the MFD device’s DTS, such as reset-cells and gpio-cells. This method is well-suited for the current case, as the EPF is inherently created/binded to the EPC and should inherit the EPC’s DTS node properties. Additionally: Since the basic IMX95 LUT support has already been merged into the mainline, a DTS and driver increment patch is added to complete the solution. The patch is rebased onto the latest linux-next tree and aligned with the new pcitest framework. - Link to v13: https://lore.kernel.org/r/20241218-ep-msi-v13-0-646e2192dc24@nxp.com Changes in v13: - Change to use DOMAIN_BUS_PCI_DEVICE_EP_MSI - Change request id as func | vfunc << 3 - Remove IRQ_DOMAIN_MSI_IMMUTABLE Thomas Gleixner: I hope capture all your points in review comments. If missed, let me know. - Link to v12: https://lore.kernel.org/r/20241211-ep-msi-v12-0-33d4532fa520@nxp.com Changes in v12: - Change to use IRQ_DOMAIN_MSI_IMMUTABLE and add help function irq_domain_msi_is_immuatble(). - split PCI: endpoint: pci-ep-msi: Add MSI address/data pair mutable check to 3 patches - Link to v11: https://lore.kernel.org/r/20241209-ep-msi-v11-0-7434fa8397bd@nxp.com Changes in v11: - Change to use MSI_FLAG_MSG_IMMUTABLE - Link to v10: https://lore.kernel.org/r/20241204-ep-msi-v10-0-87c378dbcd6d@nxp.com Changes in v10: Thomas Gleixner: There are big change in pci-ep-msi.c. I am sure if go on the corrent path. The key improvement is remove only 1 function devices's limitation. I use new patch for imutable check, which relative additional feature compared to base enablement patch. - Remove patch Add msi_remove_device_irq_domain() in platform_device_msi_free_irqs_all() - Add new patch irqchip/gic-v3-its: Avoid overwriting msi_prepare callback if provided by msi_domain_info - Remove only support 1 endpoint function limiation. - Create one MSI domain for each endpoint function devices. - Use "msi-map" in pci ep controler node, instead of of msi-parent. first argument is (func_no << 8 | vfunc_no) - Link to v9: https://lore.kernel.org/r/20241203-ep-msi-v9-0-a60dbc3f15dd@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. Signed-off-by: Frank Li <Frank.Li@nxp.com> --- Frank Li (15): platform-msi: Add msi_remove_device_irq_domain() in platform_device_msi_free_irqs_all() irqdomain: Add IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and irq_domain_is_msi_immutable() irqchip/gic-v3-its: Set IRQ_DOMAIN_FLAG_MSI_IMMUTABLE for ITS irqchip/gic-v3-its: Add support for device tree msi-map and msi-mask PCI: endpoint: Set ID and of_node for function driver PCI: endpoint: Add RC-to-EP doorbell support using platform MSI controller PCI: endpoint: pci-ep-msi: Add MSI address/data pair mutable check 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 selftests: pci_endpoint: Add doorbell test case pci: imx6: Add helper function imx_pcie_add_lut_by_rid() pci: imx6: Add LUT setting for MSI/IOMMU in Endpoint mode arm64: dts: imx95: Add msi-map for pci-ep device arm64: dts: imx95-19x19-evk: Add PCIe1 endpoint function overlay file arch/arm64/boot/dts/freescale/Makefile | 3 + .../dts/freescale/imx95-19x19-evk-pcie1-ep.dtso | 21 ++++ arch/arm64/boot/dts/freescale/imx95.dtsi | 1 + drivers/base/platform-msi.c | 1 + drivers/irqchip/irq-gic-v3-its-msi-parent.c | 8 ++ drivers/irqchip/irq-gic-v3-its.c | 2 +- drivers/misc/pci_endpoint_test.c | 81 +++++++++++++ drivers/pci/controller/dwc/pci-imx6.c | 25 ++-- drivers/pci/endpoint/Makefile | 2 +- drivers/pci/endpoint/functions/pci-epf-test.c | 132 +++++++++++++++++++++ drivers/pci/endpoint/pci-ep-msi.c | 89 ++++++++++++++ drivers/pci/endpoint/pci-epf-core.c | 48 ++++++++ include/linux/irqdomain.h | 7 ++ include/linux/pci-ep-msi.h | 26 ++++ include/linux/pci-epf.h | 21 ++++ include/uapi/linux/pcitest.h | 1 + .../selftests/pci_endpoint/pci_endpoint_test.c | 25 ++++ 17 files changed, 483 insertions(+), 10 deletions(-) --- base-commit: 00f3246adeeacbda0bd0b303604e46eb59c32e6e change-id: 20241010-ep-msi-8b4cab33b1be Best regards, --- Frank Li <Frank.Li@nxp.com>