Message ID | 20241209-ep-msi-v11-1-7434fa8397bd@nxp.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2072.outbound.protection.outlook.com [40.107.247.72]) (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 5642A13775E for <imx@lists.linux.dev>; Mon, 9 Dec 2024 17:48:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.247.72 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733766525; cv=fail; b=cw7A30cWnc2SafY+24DGz7Gj8QWrNYBkF0WvauXizofVM7L4c5r/mvoulUmxQODlooClqO7wURfL9GeRtGpdmbtOttsSWhJspcxcPraG+N1yixzpFJiEmjoaY2sYizZ1/DUuLLbMWs1am3LDjla7DcrJrJ8gFxYU4EE1TMN31ak= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733766525; c=relaxed/simple; bh=VihzRogf7h7/CuH6TuzIZ4wGG6MH7XOdaToVHZQlB8w=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=sQM5El3+Qi/qAAbfvaBr5OwQBx83l3D+Iaouo6Z/+RPKTLmA0aUsSAn9gz81s8McJzn1h2UFJhgydOPnIXSedz4WCskB2HYrnMb2hhRMvRYdrJYTPZlYfCBtEK09xyHu17Ixnte8c7QtjyRe7QbXBp0Mb8ab2d1BGlwZOzXKH04= 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=UmgqvOUa; arc=fail smtp.client-ip=40.107.247.72 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="UmgqvOUa" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=h6HWiYbyHfficjZwsDlUNsOtTbLWbBOcrADrmMlh3cXqY/CPRE3sTDQ8e/uLJkE70IxHqom9iRZSF+zy5wyF8irMX9S9w8aBlS55poOC9lkRNelYxz/Qip5KZVvSX7e7pJ/de1U5YAJugU+lu2TbRPzm4JSihZQC79DIQXtOojKONJjGlV/UmMexTIAHxT5z99BSSkTveV/qw25+F8QoaVbnAb3/WQuc+595I5XxQ7bDLsMG/oSSv2h9O5ldAG07bE7ca1v2mdlBZ3WzlDHVxierZNeyasqMNf7fr58GlqhM5/zMPlkJL20tcZPLzkMSeK8PrQXBboQ5G272eq5gqw== 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=NKqUQqst3YIBTuYRldvFw9Qzk/qMXPj/XmdMGedG9uc=; b=CgCli4Rj5VR10tVzicFhdQ2ftzlVIiTx6ErKvLSOQkf5N4c/YOQdmm6OruIbiITS8XUKInWvejWvZOyGnrJvgTo4BmTyc6EzsQoOZ771MMhv5nWVIH78+e15aGk9q56J3ey1mNlLR+Jsxoi6HIaMAAqiqXVjLYAeszptgD/Sfv4FqPVgCtotcFRb7G4sL3+D2KU1DpRMEUzSmeFJhx39cZMXcvekuitJonowJpT01mvWtvy81TrFMsKfGDZar6cQHGGy8U13KXCP5j4/8wyznRW5/3wf/oKFzQw/KyXJaMdmQk6v8DhIkKm1aHOjH/oFDau8SIA5XKHWYISAoWfzmQ== 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=NKqUQqst3YIBTuYRldvFw9Qzk/qMXPj/XmdMGedG9uc=; b=UmgqvOUafVTi8FgfmGUkgdxYihSEo8lXvasuGqb5sFqWeIsetLqFV0CSZrC90r7P84m/642GLuLyuGHX8qlRqIy19ozDFFPGB9Kvga5/Xfo6rvRvwYM7aujKFU2nAq4dyroMzE8z4fFwmkczPmON3eCj4F5iT3sFTElV9Te9G9Vs6SieyXYedbmII8PmQ0tRsKMWjFiQ8fIJjn1t+nhoVAVjFqm3d+8RyLn5obp+vHlyuzSHcKv5kH/mvCcnJ1BLc6ibdntHzTuIOFojK79IaJPMrCSPafXRY/X9VynL3Qok/+ffSsdF5kuVAD9+sTqETqfCMOUHdZIDgiKEQ9HZ6Q== 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 GVXPR04MB11017.eurprd04.prod.outlook.com (2603:10a6:150:21c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.18; Mon, 9 Dec 2024 17:48:39 +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; Mon, 9 Dec 2024 17:48:39 +0000 From: Frank Li <Frank.Li@nxp.com> Date: Mon, 09 Dec 2024 12:48:14 -0500 Subject: [PATCH v11 1/7] irqchip/gic-v3-its: Avoid overwriting msi_prepare callback if provided by msi_domain_info Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20241209-ep-msi-v11-1-7434fa8397bd@nxp.com> References: <20241209-ep-msi-v11-0-7434fa8397bd@nxp.com> In-Reply-To: <20241209-ep-msi-v11-0-7434fa8397bd@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=1733766511; l=2525; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=VihzRogf7h7/CuH6TuzIZ4wGG6MH7XOdaToVHZQlB8w=; b=P5ZtWrjInra1d8pJDhRjqJfZU1RWwu/QYItIAZRTfGUhD8GNPrTVSje3doJAwgcn12AdAo5du TomJEVUaSQyD1nGqy/NvaVxDxYSTsRLwdrOzzJiSX61jC0E36iGuwsf X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BY5PR17CA0070.namprd17.prod.outlook.com (2603:10b6:a03:167::47) 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_|GVXPR04MB11017:EE_ X-MS-Office365-Filtering-Correlation-Id: 6d4403ed-8879-4073-9f46-08dd1879b6ce X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|366016|1800799024|7416014|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?QvBGBlnRfKhOkK+BSrKgwGvTWx4/7Bd?= =?utf-8?q?TYheZmiiMUuhPMC+gbRQpP6Xnurg9BrQYIs2jDR8L+x2K77FKRefgjCXTSXVnzVlg?= =?utf-8?q?nI3V95xkYJt64aV0Xgoex7wZnpCycrUykeL5uCSaJomUyCYj+8X8vfcHeHgWsSC+b?= =?utf-8?q?FZAMHzq51N2qxviqXUyl4vXn8JqY7L+2pD/0bpnFNNZVFD1g289UHRkBcKD9Ri2Uf?= =?utf-8?q?4F6nw9WAVi19GoZPDlZU8L2qE1tNzWbZQOlQZ1N8QKKEDdaX5xjlhGIJ/gXVtD4Jy?= =?utf-8?q?1eJdUY/g4LH54jzprpLi21zH3MzEL9Jdt17H/8ynLWgEE4pHm3OtZTw4si8XTXvxk?= =?utf-8?q?IP2wK7MutoEFQnRMDq2rk+GNg6UBpp77sTFSvB+EYXtHaahcAqDP2Rfyn+WphSmzK?= =?utf-8?q?uhF3YTCa/76QPwqZ32mPjeYxLeD5RvozGbAfCHjk5SH+Qz7NiMKnTSuf/c9yRJIdY?= =?utf-8?q?G2Ga7gm5FOefndR/LYxUeBgc7gvaAlk7Kah9nMUkE6/XOx2RNxamLbtFz2c2diLzr?= =?utf-8?q?TVLQFKwa/UW8RemKZnxCS6QRny58r+YwcQvPwzqYPpUZVEzHalpTBNuJ9B4ewohG3?= =?utf-8?q?+fyx6N1Ke/hcgHqJ3GGOmCrXrppgs/sLeEjlxR1GPcmTNUqEAtmGjLvvEr7ZyWm30?= =?utf-8?q?RB1cQd2a2+OZ0cSVB9M6Aseoxivk46X36iadXCHVGpVOcaaMGPbkHSu/b94Vl9r1J?= =?utf-8?q?VTElmke1xXazZsPIG1tM+cwq5S74lGIzE29xWH96P9Bji34ISGUoNsDLd5WS30imj?= =?utf-8?q?8fAh87x9x45Ikt/snoj9uwMFQqIlre4UBJhuxbESJcu+N8ovDxQFC1Q93qI0N59hZ?= =?utf-8?q?CBEKz0BH+e2JshSUNJPdiCzP6D3moolqzbHg9XI7NP5sf0WjQ7nzNOjSbIVFkZRAB?= =?utf-8?q?vSLQO+Gjx5nrb2Nz5IIxGA4qQ1LO18tPll1bu8BJUK+81cP3I6woi3tnzCs7jtAG+?= =?utf-8?q?U/4787QA5XiaBZ9yTLBQuse3K5CHi2vsOdoJ8RCwBaZ1G10cKoZ55YihJWfFZVu6Q?= =?utf-8?q?mRe7sDU4OYypG30WYLqlGiKzBRm+STi42ymB47IGUVKYfPvZt89LZnK5KeGhfSqit?= =?utf-8?q?YorgAifLY+Ut8JN1XidMANfxGnDfXlcMZzXhPE3ov+OqLoa4QV2if+sjadX9cFwkb?= =?utf-8?q?RbaDsCld9DvbwdiVHIZ0357rTI0ADDgrEH0iuhfLPbDFSzzfNe7H65fi4a0Law4KP?= =?utf-8?q?IdLuBSdt+ZZhih1KJ1Wzfm/zFBium0Ymuis1JzlLh35rwDl9l9toom1en7GpEsj+r?= =?utf-8?q?MJhnI57zY4/v9rGlj7Z+PL7chxDApUuDuWl8FubdULdc0z0Tq1nIvTf1wVbBVcOm5?= =?utf-8?q?rd2EQ+EqkVQgpCgyZyRK8C5FoMoFDYUFtqgaGuhLt6B5H8ZBrfoPVXQ=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)(52116014)(376014)(366016)(1800799024)(7416014)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?xk5xjTHp1CgeAWZHJpMErbrnhMUd?= =?utf-8?q?cnhMRfqnvtHj4W0gFv+vdJ/MCfwLgCEev1oanoiZa001nkO8/gD09iO9cH0evm/qV?= =?utf-8?q?wIAh23bnOwbwIpdfD5j/Ek0vqqHHOiDIE18EGpbRWnYzGyFvUV4ySdgt4zcmVfNK0?= =?utf-8?q?laJiKCKS3nismi2VXpTz59EQ0wggByCcE1I2T+wI6j6gT5TA3y1JWdih8hSE0vB/n?= =?utf-8?q?V2EV76Rvhr8n0FlC1SXyBDO9xc13ol18y/z2Z2mjkvue1E2dX+ZG7amCGbPEFm7vG?= =?utf-8?q?qZuW5nXRjn/zRvehRJgLv0gPdSH2N0Af35hJFR+hwQ4PvtwEj13iK8zRT08KjuQgq?= =?utf-8?q?Ty+tzYRLHTnrd5SxeXbSvpvi4YCEO3tBHVRKFnJTzorelm8te443WLYkHbqtQDq04?= =?utf-8?q?dujUaX2sCW7T7L2o5jhbV21mkzmhmpgHB3ez6+hTt4Q8oIi/QgFnkL+3hRjGoYoxo?= =?utf-8?q?sQAPeBS6N46Wo3oumKI0Lx5KGHWaO32GeaBkmyJZ9sOpVPhGRJ+TAv3oo0MfPp1DR?= =?utf-8?q?wNWJROfR1OgnsFAthZ2LcSabWdv8mpTP5Vw9bpOlKrweFVElpNBgW4U5JTiLqs5VY?= =?utf-8?q?q1U+tn4/UoiVL5uYJV8NgGf7z8vOaNlg4MS0d6wwyg7Z8ww4GQdus7QEZNEigrdDS?= =?utf-8?q?VkldIeHEBm7luiP+62pwjYY4s6H4bp1jbE0MQVsETap5VHnzaMOGhXpVloDuLSmA/?= =?utf-8?q?TflvmU4fpinj2m0+dZZ8CJg6qUAWG/27s3x7S1oEQiXPFTVQkmK+RBapi9ARA2TYI?= =?utf-8?q?wrdltxh6NBXKdj+NyAbAB8Q36kXoaxVZSvkXkrLEg4diVNEGA2IxM/gE0ZtrY6AY0?= =?utf-8?q?AYfUwMV0mJSDec71Uk4NvTjXsiHIumqMHRkYwuzkNiJFH3sH00BWuZrBcnYZSQ848?= =?utf-8?q?yAV5dIV4dUpOirj6bN3/BGLUvIpYVfbczRGne2itg4DCX0yC/n4KjTAJr0cRylppx?= =?utf-8?q?liIE1mzqFxQ2stg8QNFMvT9Ccnh+m5Y22HoLEa+Ql+i9zhynSVw46YYEIvtQraOxJ?= =?utf-8?q?PP4K1LbpsappYHBAUVvqo3G1scE+WVQHM94Q1eolU6z21CemNysYsP6TFF/DnRP9N?= =?utf-8?q?NRNRs8TxUcxzxGabLFsupq6g2UpSDOKfjH6/0/V5GE4suNcHQkRawB87t9Jpo6B4m?= =?utf-8?q?LaMV8CcxK+4/7IcynOcsuhbIP75Rf8g7IftqsCXPH+IMxTgm0wBOp8wYERCJmHYED?= =?utf-8?q?Nta6o38tz7AA8FjvROaB1JOK+XvOzbdIcQSUZSKD8mfFmcdxlMuAo4KXe33gmgz3e?= =?utf-8?q?DZBaL1+4RZM1CLMF445skrCMeKgDrjiaMP+JGmEXjYvsCfS+SAic1gvSa8X/iEM7A?= =?utf-8?q?cfHe3R6+ZJVwJL0zUmNqkvyFbB7b16p2Bi8hLfm0jtSmrw01qJb0a4kuylh7G+MYq?= =?utf-8?q?428xSLSIPffSpmvygdSTuwd7h3HePlhYzLi2w1ofnkf1QsDLZxOsZxUc+Tenc5HqY?= =?utf-8?q?eaJkkU7SvbGn5B5+Pn/QqHFcDZJ5msmIvWvgjtO4A+df0lFz/JJJqVew=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6d4403ed-8879-4073-9f46-08dd1879b6ce X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2024 17:48:39.4774 (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: YTQfo+4V16oPhc6LJUBGg+6l/1tiFS1ul5l4tkdYUQGJI5Xng4eWM2fF2gRMK6VyDjGEpLzJi0UobGRq0ZpAVA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB11017 |
Series |
PCI: EP: Add RC-to-EP doorbell with platform MSI controller
|
expand
|
diff --git a/drivers/irqchip/irq-gic-v3-its-msi-parent.c b/drivers/irqchip/irq-gic-v3-its-msi-parent.c index 75aa0d4bd1346..33e94cfc4d506 100644 --- a/drivers/irqchip/irq-gic-v3-its-msi-parent.c +++ b/drivers/irqchip/irq-gic-v3-its-msi-parent.c @@ -195,7 +195,8 @@ static bool its_init_dev_msi_info(struct device *dev, struct irq_domain *domain, * FIXME: See the above PCI prepare comment. The domain * size is also known at domain creation time. */ - info->ops->msi_prepare = its_pmsi_prepare; + if (!info->ops->msi_prepare) + info->ops->msi_prepare = its_pmsi_prepare; break; default: /* Confused. How did the lib return true? */
┌───────────────────────────────┐ ┌───────┐ │ │ │ │ │ PCI Endpoint Controller (1) ├───►│ ITS │ │ │ │ │ └───────────────────────────────┘ └───────┘ ▲ ▲ │ │ ┌───┴──┐ ┌──┴───┐ │ │ │ │ │Func1 │ │Func2 │ │ (2) │ │ │ └──────┘ └──────┘ ▲ ▲ │ │ └─────────┴─────────────── PCIe Bus (1) is platform device, which is generally descripted by Device Tree(DT). (2) Func1 and Func2 is created by configfs The current platform MSI API supports only a single device. For instance, a platform device (e.g., PCI Endpoint Controller) calls platform_device_msi_init_and_alloc_irqs() to allocate MSI IRQs. Child devices (e.g., function devices created by configfs) require individual MSI domains, with the same MSI parent domain as the parent device. These individual domains need specialized msi_prepare callbacks to set msi_alloc_info_t. However, the current ITS implementation overwrites the msi_prepare callback with its_pmsi_prepare(). Modify the implementation to assign its_pmsi_prepare() only if msi_domain_info::msi_prepare is NULL, allowing customized callbacks where needed. Signed-off-by: Frank Li <Frank.Li@nxp.com> --- Change from v9 to v11 - new patch --- drivers/irqchip/irq-gic-v3-its-msi-parent.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)