Message ID | 20241211-ep-msi-v12-1-33d4532fa520@nxp.com (mailing list archive) |
---|---|
State | New |
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 9AA51E7717D for <linux-arm-kernel@archiver.kernel.org>; Wed, 11 Dec 2024 21:04:09 +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: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Zg17DPPYOTuadjG+VkqD69CJqHyQvuSbj4mlECIwRQQ=; b=woVPSwcfx6/RBLI3sZ5o1TJUh3 Gf639vpKdG8asaCsluSiD2ijFNLsknDBvaT9bu3lA5g0hwKy/MktPWn2GHQvGz3c7RqDdCfRjgHWi +FCkSNCxxC3J/Ykd44zHtqljVAqs/1iSsjg3KuKU8sRpf+Vz1pachggPl8A6BRhBz2dTojMDRTH9D h/82aQmZMs02+zfaPb6vl7k6QW5LZRBEdrqK7gJS6q/uh9/6Gt/ayPxpPObTwwA9LqnDVqOnfo6UO RNim0csPn7Bi2S1F0i1/chIuHD4yKAQZ3H4JZk41j2HZ7lvZotHFxtVPEco1GAVEPp5gwwlRhxEk6 5iEnVC2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tLTsE-0000000G7Gb-0aPn; Wed, 11 Dec 2024 21:03:58 +0000 Received: from mail-am7eur03on2061c.outbound.protection.outlook.com ([2a01:111:f403:260e::61c] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tLTmO-0000000G5Y8-3u7H for linux-arm-kernel@lists.infradead.org; Wed, 11 Dec 2024 20:57:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JutavMd2AbjR7Al0Z6/mYaqOwXP/wG87mNQOd6mWs1mCOELekf0Adl/bQzcUPrfMDs56Uql7YqTYpFWOQ62rN0Th7a0YdiAyMKzCxPWSE75avHsmT+BmBUaeKo6WxtwdH+eYXBv51wto98G6Ic9WxX+CEjvKDTH9yWs/4bCrs7gptwQNy/RfrXdAQoKhgW2m6qUn/32fJcdxUEhbwO8bIiSrBjI3gDoBYGzxNTjLb0AAvQnrFdmBDcjZ1mY2KWuuQ73eK75xEGQ9cXRBVhYlRIjY8L0VLRttXRQHaF6/tX02qLmGRM0bDSCMEfHVjnDGHAWUhRjKF0nUo63N2+Yq/Q== 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=Zg17DPPYOTuadjG+VkqD69CJqHyQvuSbj4mlECIwRQQ=; b=h397yoB125+bEMC0nmOP2p43mXrs/cmMRyf2wadW3rUo+U3P2QMSC0V0HNX59UMdlerbZYURgu/BZcwq041azthZT4aZStc4whIyUVaZfukjdqKqV0tjperKSeRN1x8fa8Q/rMwEuzbhYHBFV2UdxJdIpPIzROS1/DhI7ira37ivTe7EtA6GKAdyaNJ03Cg/lhYvp8Y1WBs0NYHmZ0QvnZwxVgv7LqINj3FxQ5e1jd4TsypcOwE8lq6+pCBjQv0NSbybcHi6W87OBV3o43PVOTptUQTR/wmLnjp4JGN4iTzPKIeA6BJ2pP3dp6PfPYiNlUj92UBEznC6HyoKPIa0fw== 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=Zg17DPPYOTuadjG+VkqD69CJqHyQvuSbj4mlECIwRQQ=; b=XkuOxkTmzRSjcu1arez24AsI9ewQVEPvV5RLGP3boUpHuMDJ0xfqF7a3ohMnsk1taBt9JBWP5Q9wTHImvraOdoIuRs0mW6AO/uW/hi8XoqugBIdMNjGDjaOkrzNf7PPMsEpT4DqIFoIbCTOQiF3qOVm33kCrxr5HMV8u04ytF3lu2Qht8+daLjB8p+sFHhjZgQM0y1pywLuwNJf8GFBsNBqrxFfZ86F7sJ8nmkWJfWxmdB+xcejTYujSmYNmTr9Gzw3s0D3fUrEgFJfSpltNn/yY0nhtFcd6zb4NuylvM0AGnIJxfuoqjCwnNwZo+KQXz2R6f1IpY2eGA7el1+smPg== 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 AM0PR04MB7139.eurprd04.prod.outlook.com (2603:10a6:208:19d::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8251.16; Wed, 11 Dec 2024 20:57:54 +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, 11 Dec 2024 20:57:52 +0000 From: Frank Li <Frank.Li@nxp.com> Date: Wed, 11 Dec 2024 15:57:29 -0500 Subject: [PATCH v12 1/9] 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: <20241211-ep-msi-v12-1-33d4532fa520@nxp.com> References: <20241211-ep-msi-v12-0-33d4532fa520@nxp.com> In-Reply-To: <20241211-ep-msi-v12-0-33d4532fa520@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=1733950663; l=2559; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=h9rTyIw7JBTy1EJzxkuF1XAJdSITdDV9rguxRpQSuCE=; b=2aRlvWumyidpf84WG24Qliz1Q9qLqiUdSsjcTrwNvTPPY3x2ktuzFuXMSb/6iwZFHnNVfmnUt yv9QILwBLtcCSGExXA40qui42uvNU/gexQNhy4K0gsrsaeSO/LvPRhG X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR01CA0037.prod.exchangelabs.com (2603:10b6:a03:94::14) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AM0PR04MB7139:EE_ X-MS-Office365-Filtering-Correlation-Id: a224c0da-b0f9-4ac6-2aaa-08dd1a267a66 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|376014|1800799024|7416014|366016|921020|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?WqZHC0vJV9mJKVKLj3JUVLQ5nYbdd6e?= =?utf-8?q?+tFrYHzhvRr5XD9Tfx2606bG5DP2lY6gdxZFJYxCKl4i6KrZR4SD+xxKgySGHpnGi?= =?utf-8?q?C+oGptY4GTc2Y3Dpqf3pndV8OSsFq6CcxM2bNELJcPvKqXSdC+TFy6oADmZUH0/S2?= =?utf-8?q?7uQt720eL6KzwItYR0JQJ4rPtOSlPOI0WbP182HRHt/uS+EsQwr8kTLBAYrkMv1gA?= =?utf-8?q?ri6gJPQy4qRs+NxECPTwjPsAwq9DlhkMKfOtt2LYXuyldSLQOvp3t9beR+SiksuL4?= =?utf-8?q?4U8iVetH/hSoQzd6bFID90E4N4v4Z8jan0UO8wmGBOfy4jb1ObNxCN1kmOBFcakLq?= =?utf-8?q?19+KqNQ3/PjRppnWjv71thoGMvTTVujExTUseJOkxOSnOtgAvdrww7d9WsqZr65eT?= =?utf-8?q?GeVTEH11DL1/+eSmh75r8L1HkAP1VMZBwZ886xsIAhCWFpK63BXDnfdJ46i7swC1w?= =?utf-8?q?QZ3AkgHQFm/LJ825aArWMo4gdwe/F2mHpahIz+uwyqbJzOHzHaI0adpTxBEGSmTVk?= =?utf-8?q?M8AKjtt1cUiJ/IARTR+xqEJpUDN5d3Aw7tK2Qs/Mo2FrXYBPPcIBj2slF0UhWuGjq?= =?utf-8?q?4q2abJyWoxy5G8FKB9ywnErY7Y3qETrCxDLGzhfg8astOqqf48iUkeKau1tQihuIc?= =?utf-8?q?/1wFuw6U8wPfN4PZtBgAqWllEOfSpeYWZ3D5t+rBz109ncVNvLNu1JfdDV+SduOAQ?= =?utf-8?q?z1OctnOF4acTi4TQV+0zdVEHD7Rrwsa4J01GE7jzKCfHXWjc6TAutvTJqlRcGKTlV?= =?utf-8?q?NTJTRmocjXdO3Nbic2PK62Oq5GgSUXZCceaOk0mfIYajocYhChX14axgyEXNuhZt5?= =?utf-8?q?hNJpDdisz2Tg102jkKADIzlh5MKq5ITttY/Cxtdd62lz/0y7nWPJ7f37fBKGcRD5v?= =?utf-8?q?LUc2XSV4Komk6IexhHr7xgWdvwzRo6gRTxZeFPNagtPgN/m+L48g7JdNkTLkOrF/t?= =?utf-8?q?DckoJ+tBGjjta1/6Uz0TYjFoS98JbaC8FxuAHSfk+KKJVN2pXlitaGSjLQ9cJ+ncP?= =?utf-8?q?ILg6xiod2I3ZqYvR54yFkS1uFAzb8zIqJbjbGl7HTXPW3OVc51yHokJgsFpH4edh1?= =?utf-8?q?wDRv1gW9exgojDdTWUjvRXzs3MmK2ziXLg+V851yci21M/a9ABty2dEHS84Ckztdx?= =?utf-8?q?Y4AbZ851J3PJY65wwbaz2iET6hFZmSGgcF7pzIJdm5x1cRyG6q8a2Up11r7ecvMh9?= =?utf-8?q?LmO1k4IIfn08KabsefIfyJmyizg0iIjCf2PkPcxNQYQy94jbJ4pD1UfdMEnVcnKEn?= =?utf-8?q?JLKnSvfdg2u63xMUYuWvlv/eS/aGDtPdbsH+eC2HNgeuSM4SRFUQ3HzMnWebSX9x7?= =?utf-8?q?pu9ubK8mmc9/sUdHm8ZF91olwW9Hjhp+qWQwahzB+1v2PPXRtb5hPzU=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)(1800799024)(7416014)(366016)(921020)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?iXGL35JdSaGUeTfBGK67vND1HG4b?= =?utf-8?q?fGVNKIrTw833a8sf1dZaB0UbDBIVXdK1FEu5jlHcDt+92LsY0UYOB18I2Hsop5/9u?= =?utf-8?q?zu2L5QcUq1I3dwItiFUg6NtcnRExWw28RqluXgLVNKxwY5NpxONXX4oYNk6fhauNw?= =?utf-8?q?ibeeQSsSf1tPoagLj2CtO1lj0JiJVQ6WBSegw6zaQ3lgzz3T0cHSFzkFCCafaVule?= =?utf-8?q?hoGEz869NSLLGM5+EiQmxI3sZHBL68sHeAdDumKHX7PllsQbfs26IbGoiY+mZripo?= =?utf-8?q?ddM6IRmUe02/Mdg8AB9glJWQ0fAHFdSiA94LOAyUlx4JZoPrmmAflWXeU++EVNYlp?= =?utf-8?q?R/enGJwhFz8H92kAiH6uGpTauKtrbjfdrA1aomSCSSYWVkzRPyPYgwrmcSPmXMSy+?= =?utf-8?q?1dPn1SOSHZbnzxHudobZy+TnCePk0ZTRe60t1ANhbN3//e4XKvSK6/Vg37Z0amAQt?= =?utf-8?q?u3CyIdLR8WaTURSNPzmMwAvQV3qthONSO+gZgbK33s/TXOQI8IfoaUKX2Q+XCiZId?= =?utf-8?q?obgmrEc+PPcLcdw8hcK+Xn/0SRk1EkHxymc1075JgKBiZF01zUYh70N9mxdMmpQfP?= =?utf-8?q?2//weQJxEZNmIRboj66NI6rKcKFoU+ITi5FipP04lc0Foys2eUpVnAXGajrdTi6yX?= =?utf-8?q?2q0qO4wHn1JKmBuaLg7mi68TlhVYKFuewhEamlyRH+sU94iWhneaSZPQCr6w/21s/?= =?utf-8?q?18z0/ShUgrNwmRo7hIovaKD1GaVP3XhscnCmICs5+vfe3L7Ymwn3RcsSiYuwofW+q?= =?utf-8?q?/yFqrKKVVA9TFs8FrZ10igeXeyG9RE+STU82nOxEOelMd4cyNAAYCqh9RSxfeRQZ9?= =?utf-8?q?/CsqZrHCvzB3DgqbTDVFPta0h3/qzhz9sJ9oDzwdcXbFmg4laXAAmuw4t025/+X98?= =?utf-8?q?aa+CqzYTAKGkSs2mPS7XVdmnhGJI6OLDesbEQ0EE+ienVUqBkfdKpSbkCdtGCaUSG?= =?utf-8?q?A4i6+2aZT7PLQn5mmN5AzJVaCcSoM1YmAr8kIUaYOjSa3y+4bwjqK/xzyDPT64bkz?= =?utf-8?q?3Sqh+VFwrLpLMLrKhv7JIaVAqf/ifigRd1zKa+743MF5ahm0NHVIs6AYJ0ggT1SFk?= =?utf-8?q?cATMRJOOaYWV6KS/aV2aoS++BqUiPReMM/KT8j0ViOkFc+Zl/1B6x/W7D30TqZyNl?= =?utf-8?q?qcW0EWhLGhDfh0qZ7J9YWRv3paFpBvKlXuKct75CjXLEtRj6Nzk1afntX00mAr7Pn?= =?utf-8?q?W4BUkE9Uudl3NhZ6h+jPtxh0cjGUlHpPmtXxcOYlClAnKPbi1Bj/6Jsk1hyDq5A6V?= =?utf-8?q?obRtJimtwMfvDZAhjupi8gRjcsR2ipGOnFU2q5VgLJw2dpcQdCXCj0cKEyijmNvc2?= =?utf-8?q?wGgF2wyUe956pnZZJpXk0cRDZ+OQ3GIIZ99rIs5+ARoIN9KvgeMOe8QP9pxiAn0zI?= =?utf-8?q?7Cmnlq3atgnzCcGzX2XAKEAy0Ear5gHVKigltuYvSsKTByg4Tu7O4qlLMTdknBOlZ?= =?utf-8?q?yT1Ie/fX8zW4RKL7B0IpAePjvgQmQacGzw2NKtWt5mAw7WP8SXW38EEAFvu3nskxR?= =?utf-8?q?LpgeJ8Ab2ARQ?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a224c0da-b0f9-4ac6-2aaa-08dd1a267a66 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Dec 2024 20:57:52.2212 (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: u9k7tLyGnIuJkTWZacOAhkqmg/m7GLDV35alYdLgRrOSZ2NO36vd0Gt54vH+RTAXGIOnPX8fABa/KRltnejoLA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB7139 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241211_125756_967780_741DC4D1 X-CRM114-Status: GOOD ( 13.09 ) 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
|
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 v11 to v12 - none Change from v9 to v11 - new patch --- drivers/irqchip/irq-gic-v3-its-msi-parent.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)