From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 82DF4C021B1 for ; Thu, 20 Feb 2025 20:04:53 +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:In-Reply-To: Content-Transfer-Encoding:Content-Type:References:Message-ID:Subject:Cc:To: From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/+lIbTSbIDpfC50YKMquZV4u1BLWaBEX1pFbxjijc6c=; b=OYu9ahPYFvxqqAykzqepo1vBJb dMh6pqZ9ft3jJ1KWo5S24QqMAcuSNau2CCxi4PguPRgJCLkMi5ZuPjKtEPp9fnaQkGXKu3gaYZOeg MNZi8byA00dtn4bJZ/t4PTPmTNAztPnIUR6UMROqjIQCnfGX81g2T0iXfSw/Ckyqv7rXdBWAq3LL3 XtyYgF6t+X0h8VKEtLJssSVbDXoAhzbENmrVf9Xqw1+lBPu7LeusU7PuyG886yhmyCBG9H9f80WL1 u97LThbqKjs25aXS1PQUz3DrbZ57dGScB4cOGte3lsHo/Tq/i3Xn4U+gdbdreSqmuoGW86S6ba/mL JE2yKPTg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tlCmn-00000002isc-0KQt; Thu, 20 Feb 2025 20:04:41 +0000 Received: from mail-dbaeur03on2060f.outbound.protection.outlook.com ([2a01:111:f403:260d::60f] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tlCjx-00000002i3v-49IM for linux-arm-kernel@lists.infradead.org; Thu, 20 Feb 2025 20:01:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oi0kNcAxgT9coOGxBPa6sDCThVzNc6ZqbJgTD+B0hHWcERvozPbtj4tj7/XH3DAvb5sWfugLVBv6rF1v2EnKoX/kFEe8mq70MBh5s29XYVk9P71jXfaKLmlvAvWre6qiEXqA+QudKGSCOPkLrdmD6+/kE92EV7R0NzG9Ypg4nPk7j2JL+Whwh6chgzgY5Iz6+yMOw3OWUR0CCxEzgPIM1KcY9QeIKthVlqOwAfAWbwCxq6VS1Q0+mVF+N/ZnCXn9wUEjUKFmSLXevJiIYyaTMX8KQCsp6XWFR7zhuteFDI/ch5bXaTrxaXGudNGNC7YVEdyEVLyhs7+Wty0cHBQjsw== 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=/+lIbTSbIDpfC50YKMquZV4u1BLWaBEX1pFbxjijc6c=; b=SnD2kaEN9I+Y3LozCSRItrz7d1obL2pHGbhLuw+uEP37OylnF22d+ZYfRxzbMOjIYqG4iyvgSNbufznIAuKK/N9n3HQJa1K1LuXCu9n3QToeXv2HSdEyLboV33/jucRX2siwr0u4/D1U+M9nGIURtLA/q8jfRli0QiR1u0yC1GfCl46vb2yc8sLeJ3LzfuvXvO39mM+gP+7C3AM6Qv6UJD6HkOtojFZGPkLo3b/1h0nge8m9j2ov9DxvxkKF1HtHgxxNDUbPeZmhnjmBgbscjLwF4Uc3x23vDMJczfOwADPNroEsobTIknFgrQHI8+4F9+xKF731yxCdzTiiikwAgA== 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=/+lIbTSbIDpfC50YKMquZV4u1BLWaBEX1pFbxjijc6c=; b=YrL3a7f4SopdHjBnMhqMHUCHoeL0x9lUqnpNmdy5YfMt4fag7seUQ2wFwYWk9n6PM5/j/6kxj+XqEBmAfNtLjYQqUQAkytoscnTIOXnz8AokuMsvfmz1KuFRHpwDCiX4kTyDGFksNZiHyd5eyoXbCCQVxDLqcbiXkmzwKVn62pafllp+YW0dy0ofeglOtX9pGse5zxLxC1Fxc/nDJhKf3ZAKUAjtyHuDIU0uAIMUbuER/+wsSqagkvKuXk63meOU68R15v4DWZzjTWN91ep98O8GGNGvALsN2H3kU/muCGJioa0psvh3UxNH6OrjEHQbtwiRMn3FOVvsZyEsYihfkA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9626.eurprd04.prod.outlook.com (2603:10a6:10:309::18) by PA4PR04MB8062.eurprd04.prod.outlook.com (2603:10a6:102:b8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8466.15; Thu, 20 Feb 2025 20:01:39 +0000 Received: from DB9PR04MB9626.eurprd04.prod.outlook.com ([fe80::e81:b393:ebc5:bc3d]) by DB9PR04MB9626.eurprd04.prod.outlook.com ([fe80::e81:b393:ebc5:bc3d%6]) with mapi id 15.20.8466.015; Thu, 20 Feb 2025 20:01:39 +0000 Date: Thu, 20 Feb 2025 15:01:10 -0500 From: Frank Li To: Kishon Vijay Abraham I , "Rafael J. Wysocki" , Thomas Gleixner , Anup Patel , Marc Zyngier , Greg Kroah-Hartman , Danilo Krummrich , Manivannan Sadhasivam , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Bjorn Helgaas , Arnd Bergmann , Shuah Khan , Richard Zhu , Lucas Stach , Lorenzo Pieralisi , Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Krzysztof Kozlowski , Conor Dooley Cc: Niklas Cassel , 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 Subject: Re: [PATCH v15 00/15] PCI: EP: Add RC-to-EP doorbell with platform MSI controller Message-ID: References: <20250211-ep-msi-v15-0-bcacc1f2b1a9@nxp.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20250211-ep-msi-v15-0-bcacc1f2b1a9@nxp.com> X-ClientProxiedBy: SJ0PR03CA0346.namprd03.prod.outlook.com (2603:10b6:a03:39c::21) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9626:EE_|PA4PR04MB8062:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b7ad40b-51bf-4a19-e74b-08dd51e95a5e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|1800799024|52116014|376014|7416014|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?em96SDkxeFRhWGszdXJwSklWMDd3aExIWDJVamhqeEsxc3V0VlBXOHhHRDhV?= =?utf-8?B?MC84d0tmaG5rWUY1UjRkVGlwdUQybHREazRKRklTd2pGbFJkQUpWdWVheER6?= =?utf-8?B?VjZZazFNcXZIdGN2TGllVmFHbUhQbmg2UHlCVFVkQTFYa1RhS0NlbGI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U0eFhyZ3A2RmFwaDdE?= =?utf-8?B?SmdlanhsMVlRPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR04MB9626.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024)(52116014)(376014)(7416014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bUtKYjN0QXNQVG9hTzFQSkU4MThVYUVMT2NITmdicm5XbmFZa2JWVVdwTUtT?= =?utf-8?B?OExQTTY5eXFCM1hwakd5NzFuQ0lnaXUzY2hxajFwT0ZVbGptVzh0Ykl6YTQ1?= =?utf-8?B?eE8xM1plWGNVNFlQS2dUeUJPVS8rVjcwYWVUbG4yYWc2ZEpBYzhVMWFwaDFL?= =?utf-8?B?b3pyTHNpVEhFaVJEWStxWHBPS1RlbnZFTGpCU2Q0aHVzZmxYWVpKS2x3cnpN?= =?utf-8?B?Y3FtcmUzVFJtWkM1K3cvQXQ3VTdOY2RrcGEzR21xRnZCbTF3SzY3QkZmeHhq?= =?utf-8?B?WGZ1RVoycHg3dDZVQ2I2a29QT0plZERMNU5vdk11Uys4UWYwaWw5c0QyTGxH?= =?utf-8?B?aVVCTWJVU21NNUFJaHRIYlVkanc2cEZNZWdic1RmR3RCRGt2Rm9JUjEvYkIr?= =?utf-8?B?N3FVSkZOZDNBaEpSZlFlOE0rVTN5RDlOcEF0Rlp2MzZuSGNNbENDVGszcUph?= =?utf-8?B?L0h0VWdyQWk1OS9qK1dHMFdmbzlEV0V4dXdPT1ZBbXZGRjlkVDZiL1NBS09v?= =?utf-8?B?dUUwUGt2cVdVT1FUNjNuL0JoTGRjbCtMOEErNzJ1RkIwRHprMjg1M3FKYTZm?= =?utf-8?B?WXlNUldLRTYvLzVVZGprdmtMcUZDanBDYnNObHQ1aSswbUJ5M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GIvRmNJaXdqYXN0L1o3?= =?utf-8?B?Y3BvQlZackhMUWZNKzF5ZDBWUmc1K0cvcVU4TlB0NDlPV1RLZTdjbktDVWU0?= =?utf-8?B?ZmQwWFdJQ0VwOXNRNGl2bEgrSUxpcDgvVEVXbXB0RTlYZEF3aU1FK2VhcmRE?= =?utf-8?B?U2EvZnlzajBySVhFUnhtOU8xSm83SlFCREZLeGdiVTRYVU12QTYvbmtzZVlu?= =?utf-8?B?anlNNk1MVm1RcWJYNGFyQm1teWpucFluWlAxaHlBUy84OUptQWVDeFB1T2p2?= =?utf-8?B?ckQ2QlV6d2tIRXVGYlhJN0lWVThjcWdxYUl5M2IyMmhweUxDR253WUtJY3ZK?= =?utf-8?B?anEwby9MbGU1ZlRsMHFraElmVzk3Ti9DREtjbFljem9DKzRHT3Y3dEZUczRP?= =?utf-8?B?dFovWnMrOTVQWjNqS2ZqdkZkQXR2MmxKV3gxMUdHL1FQaFRTNkR5dldKQ2pv?= =?utf-8?B?QzloT1QvUURTbU8xbkJKakcyZTlhWGJ1VUloS3Fac3ZuVzg3VUtvS0VyR0lC?= =?utf-8?B?eTJzbXlwZEdybWlMQXlsNU5lbElVK0l0UDBzekdaY3QzRDlCQXlhWGhPekxi?= =?utf-8?Q?Z/dAf2+No/paEg2usQ04fkZMY?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5b7ad40b-51bf-4a19-e74b-08dd51e95a5e X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2025 20:01:39.7703 (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: pdRVtxAX0WEiTwJtauTG5eWum9wiFbhnOw5mpkx0M1kbK7c8eZKMSKWlDGyBdF1jbRHAtwnRK0xrld15q4QmHA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB8062 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250220_120146_204421_B0AFA37D X-CRM114-Status: GOOD ( 25.73 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Feb 11, 2025 at 02:21:53PM -0500, Frank Li wrote: Thomas Gleixner and Marc Zyngier: Do you have any comments about irq/msi part? Frank > ┌────────────┐ ┌───────────────────────────────────┐ ┌────────────────┐ > │ │ │ │ │ │ > │ │ │ 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 v15: > - rebase to v6.14-rc1 > - fix build issue find by kernel test robot > - Link to v14: https://lore.kernel.org/r/20250207-ep-msi-v14-0-9671b136f2b8@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 (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 | 1 + > drivers/pci/endpoint/functions/pci-epf-test.c | 132 +++++++++++++++++++++ > drivers/pci/endpoint/pci-ep-msi.c | 90 ++++++++++++++ > drivers/pci/endpoint/pci-epf-core.c | 48 ++++++++ > include/linux/irqdomain.h | 7 ++ > include/linux/pci-ep-msi.h | 28 +++++ > include/linux/pci-epf.h | 21 ++++ > include/uapi/linux/pcitest.h | 1 + > .../selftests/pci_endpoint/pci_endpoint_test.c | 25 ++++ > 17 files changed, 486 insertions(+), 9 deletions(-) > --- > base-commit: 2014c95afecee3e76ca4a56956a936e23283f05b > change-id: 20241010-ep-msi-8b4cab33b1be > > Best regards, > --- > Frank Li >