Message ID | 20241211-ep-msi-v12-3-33d4532fa520@nxp.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show
Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2049.outbound.protection.outlook.com [40.107.105.49]) (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 4BEEF237FCB; Wed, 11 Dec 2024 20:58:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.105.49 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733950685; cv=fail; b=etfvDxg1jEHsTbkq4S9N/YZceqVGjiuCL2u7MwTrsW30N/e0jwl5yqEqk7UpSpLrGm0FjIlqi6apKpMW6rBj2PWBFtLypiiYBI3asp5AtgZwiX52iangKE8qmQlptT/lhjRkcHY/xtZI8ZjMvAtKoAPez43ErIAtS2xXwtTUms0= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733950685; c=relaxed/simple; bh=9MukYG83d9aOMQcFVfHOi1d9Wyi9uvJG5YjZivBzTwY=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=s8Pa8aPwJHo64QwY6zxLrr3tWg0JJ24CfyC6yQ20cVSgOAgFnQGg5zzxyXqbTmyMP53Np0Lb4gWUlb1juFQE4WvM7HyiCYqjHZZ/CMvmaEIaTdd6WeWclyZgPxRJLpyJG87D5qxSHju+7W2R+lvz8SsIfTXFa1+MjvSxmqkpOXw= 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=k4Uczbtz; arc=fail smtp.client-ip=40.107.105.49 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="k4Uczbtz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CgebTg1x7Qh3Ks2Pn/T45WngaC0EoinTlC0ZeVcYR6RZhOZHazoSVdsKemKEXvNfAUVA8ZlR2h8nE/qufWsI5oFowG/XeF8Fki2C9x9UuMT9zfgNbsVtcz1zk4+tPECP9lvqTb4ZcOjVBs3SEVHb6g3nqOXmMvNgBHdR25VJL1jqVKcnN1oMMoE4KovAO7D8Kok/172whRF/Ywq98yfJHluDXs0GOk9jrOHfDZLYtWMm1V1v6c/HyNSMh4RO7LTQdOFHbJQa3z6rPgroRaZtXpouyhu3ha2eW0+Vxv5bcaSuKx5SDiUpAbvP+ZoEMg0LGGqkOgH4XPEHyImC+vn3Sw== 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=8rHiESil2o4GbVOYFQ7zKfqjJLUUmLHnPeQkTukgKiA=; b=mPi97jM5rQPQNlkZD9evyAcuGOBxBN4SAv3v6khQbiTQQdJNPCT4tyM0JSdhP6YzKKI+dMaiiMA1KE8s/rFB5nTWPvfD3bztSZeYMcFr/wTkIK5PsgFzXSMXAiGwHVsoDJoeid+EazzazazrY/M6+KDEj0RQVZGyqy7YNSu3AWURDq8tM/pHA2QJrIHJWiK3G3PP+JdWl/zups3wBihSPOhHzWZf3qCX3So1sWWZKZ4hIXbu1RUsn2IF3ngI+STNOXzn3/fwHJnzOROURjIVSkcx8zVRh9IDRDbwq7YE4w+N5n6Er5/H6YSikkGq/HvCSgKl3R8pU1x1Vul4AdcNxQ== 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=8rHiESil2o4GbVOYFQ7zKfqjJLUUmLHnPeQkTukgKiA=; b=k4UczbtzKHIZL4xBCfilESkWLAkrGJS/dceN1TH0ZbbgpHrj4V/UqYFtmXA3p0ApYzskETtYJhZ5KRq0Uj52ecI3svFXC/j9/i9/47ZfpGS/dllcfdmrpRl6fj2/2WCSKiRREc8c3B4112BjDZksHnN12NT0vjzBa16x9B2F9HG2KDxM0eKLr0WXB1vmASYraGb3PnCpXfTkTLr7CylKVh6DzMCbKmPgVh4kVBrzWlYiM29C/jyPbbFOFTfiKPp37F3VczFMd5HVwgvBVQxAqwB52+dx7LqgmPEavCX8LS2KOqT9P5whCenG3EixanKJUuD5QNYSgVT/cwzpMxXTZw== 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:58:00 +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:58:00 +0000 From: Frank Li <Frank.Li@nxp.com> Date: Wed, 11 Dec 2024 15:57:31 -0500 Subject: [PATCH v12 3/9] irqdomain: Add IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and irq_domain_is_msi_immutable() Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20241211-ep-msi-v12-3-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=1853; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=9MukYG83d9aOMQcFVfHOi1d9Wyi9uvJG5YjZivBzTwY=; b=Fb3dWhQjs0wMRJeR9Rgmc45PlhjuOYIJ98UBQhBCRcCQwpCXcrxFdvXuy5IhZ7UCjV+3pggm4 1hN/K69HGbzDZAhCIqalLf9rskSXVUh53UX25n8DdMf5TublZOJTE38 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) Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: <linux-pci.vger.kernel.org> List-Subscribe: <mailto:linux-pci+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-pci+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AM0PR04MB7139:EE_ X-MS-Office365-Filtering-Correlation-Id: b5c96464-778e-4563-e086-08dd1a267f84 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?Say5jcyGMDebQ7vl4J9sAVWQ6XmXZK4?= =?utf-8?q?c4hzklJYc51lWra8OFEBoMHwfWhBpoOEq14vzYPtWrWrEtVMMmc7MfVLhoemNdxET?= =?utf-8?q?SQzoQunLECL9xtC8UTOuCBzLEXz3BytrGb60ielpMYGspcK8FP9kRkdkf6DuxfviR?= =?utf-8?q?efljlLtby5TguiiLu4ZhH8gCze9e8tsouj2xJiaOoEtPqbOre32fEoj3zuS7lkeqM?= =?utf-8?q?J7aZvZ1c/FbGlxVHxN/guqex8jXw6eFvwrsUC6xTPbvEXZvTwx1VJK+esXibLZtqg?= =?utf-8?q?fN/zMIownmuXJwICRUbMRClriuhi1IaSqdbl3gGkcSoGAbLmr1hPlHeG/lMyX+c+D?= =?utf-8?q?+kmFc3a2Dd1VleS6MHDsA3SgGwy5ymG3qnojHDBIq3OiKPd31Dm/8HwvBeHjcnM6b?= =?utf-8?q?WZTMme1wdwsO6eDVJNl9Z06NI0ijBpNaCp6ZrsvehZ+71/JtcS6Zmf+5Z3sDdNbW+?= =?utf-8?q?HP5G5zitWn00JF+6bC2AwNi6SUrOPZdEKBEdbZzVqcJV2A1T1Bu5RQ5w19m9x6gbP?= =?utf-8?q?CLQF91zurYIe4Y6b8U1HsZweU0YcWOFXZ/DYtOabeI43dsPa4SD9iqoS2k2n2gNol?= =?utf-8?q?0a2e1HSq9TFNIH78qpA7O00HH9Aq8xSs0SrFAbPRqLtUMdmJkUm2d70NhSQEJ6lhN?= =?utf-8?q?G74z1M1QpcxvRBpz0hChCKDss12V7fO5K9M6Rp/+qyUIIy67uu6ZsOVQE4YViK9JG?= =?utf-8?q?mYnW53FstGfkiaMS3NzZRE23CxlaGzRqC5wUF86Ehb7S4bm4IO9QJqRlUR+BRlh5q?= =?utf-8?q?Qfk80CJ8O5JZfmvp18p7YHjqurMBKfn0dN7AmiuWwQs7ySuuuBX8Oc9vsRTI7hpt6?= =?utf-8?q?qAnnes+ZckgxPN685oB+39CDamlG+ZPCzLM5nn+cuC29dxL0tPRfT7f4042HQTJ+c?= =?utf-8?q?1ckJhKbS/1yBxLfZLIXBh8JaC85+EC5t3pDJpcqPxGixAHa8Ffn32WmwOpRogCdJn?= =?utf-8?q?DhQuSMT6cdiDECvCNG1zdOHPsy5YczW4Ms/zAD38mCw+Wjtljk1N1ba4EodxxgRlz?= =?utf-8?q?17wp3oKx2bO50IFUcYzB8MqG8SKH0S++aQRWQH0zNh8gSR3IgFaOmu0+KFa5jRScK?= =?utf-8?q?8JwBwym6j6A39F0XeTjToy3EVNzubQaqeRzxM/IKbv+e6OKaM4JLJuk4B158clvME?= =?utf-8?q?uPUoCCIObc2Z1HjPTRo4tJcOY9hfWmvolDPUZDxIakwVo0d4Jc1YA16LQADln0jI2?= =?utf-8?q?6fz6Nag4xqF5nGXWaaHYZrrDnZBeBAuNkjeTt299BFdJbYUp+NeRuLQaxLlpe2jKA?= =?utf-8?q?w+nNoWDmdmgMZc/XAGX8SdyGzZzaV3z/IDXXyrvzgV+Nu/+SjPFa8EuXKj0+O40jn?= =?utf-8?q?U3apfarszuVFzC/+PFRULG8zrXaCaZfSj6r8ly3Aw3rB2lyVut+w5jI=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?zYG0exypmTWg7/Mv0ynePr8Szb7v?= =?utf-8?q?3l0yMex+a1JLy/Lpyb5W3is7MmeMbedfKVkO0JlakfyEVHGdOAn+tXnT7hDNS0HEM?= =?utf-8?q?RyPsk4WQ7BOGmGAbbPA0I9xd+wsZAVbogl3UV1FZx33KlGabMEvlU7LWG0JwvpIof?= =?utf-8?q?T6cSy+X4Kb3YPqhvQZ7IDx/NlFHadKwmQVuSOo8Yvl6yqOzquQVOVwh3wQDIXZaDS?= =?utf-8?q?212ZR6KeNJJ2jU50/xaktRbmRjYXLtQl6OC5Ohg8XAaF5MNX+HW6HX3WlyiQM1LED?= =?utf-8?q?MzQv8c7AE2Mpp739K38nnLDrurrnXU30YRc8XBe/J5TVZuFFQBXK+XNHehSoIk0GE?= =?utf-8?q?WF7p8/L9B7S8PQYuaR/GyUAvUhkjnfetEG2NbUogkEcDfjdTOGtiTBezGRhUErfze?= =?utf-8?q?iuRn2KU8lH6xExbJNKcAClBL48pQw3aTDKX0aFvS/wIATlThkbrHgK+q4mv9VU2Md?= =?utf-8?q?7eXw7zyg+BW4cLUiNNQMFvDk7FR2nUzoLj6zbQRBwWetWF3K7IHNbDeupLeTdOCJa?= =?utf-8?q?lhBoAkcovuICjjHouEZcYyEr05Q0+SukX3EdeQIJyKEgoNalAR0bOzkwrzLTSi6oy?= =?utf-8?q?g29RR9EvbnDxAcJoUwkGpnUHgGBlJ7FGnFE2DKyX/HuoPov6vdvJiyUHOdp5ADvtM?= =?utf-8?q?NM43fzuq6u6XJvphPnbnhCRN6LrdWVBhgsL79Bno3dXJZozYz7wy5NCUTHgaCQipB?= =?utf-8?q?6SbteDSSu/aln1Ceh13u628O6dvvP+eaA9/Ym7qP/Io2fYqVRCPtFR6lp3NV2Gq3d?= =?utf-8?q?ZMQzX07NiozIMPHigahEPTkni4MeWQ5ex5dObq5GvjaINertueXBWtmfB/x6lGQM2?= =?utf-8?q?4HGxtNg6dWMT6TqcpT4DAlL95hx83+EXmE04DczXKNIYZHx85dqEpGYqG4xU74Z9x?= =?utf-8?q?TAShDMyjakov3i8t7IMnW9a6s3VEcJ71Hcq5AbA0ODvJ3OSkllU501bLEG0an9aU9?= =?utf-8?q?bMNBjSi2RgiKaxcHMgN4yoBBk0fOSp3nVrmpPqn51W+YxmeQPT31awb3YgHPNufDT?= =?utf-8?q?bxq+mVe42FfrCgvrqhvN4Z0SP4jqfWXSp4e5TN4GqRBf0YGxsuFzJz/XYNp8/rWKj?= =?utf-8?q?mIcyh+mbfwnt9bVHBr9NqD979myHxsZLp5dnwoDObKDi1vqIeqb8AIVJpf7Y8VFGX?= =?utf-8?q?wuuHdAPD+ls5AVOHPOxKZxS6KZWFWlvOV1vffdt5+OiWnAOAUexmEVtKRXeb8HmBR?= =?utf-8?q?Rt1754FudDYbFXhH+07hJXSdoxv1dcJ75k0EupUHJen/t/oXuJTMPJdp5WsPLLIvc?= =?utf-8?q?t6VXsWWZj/3u70EWS2byTZc0uiKe16GzK8CrXanJfsK8dqlVo4LPEqKr7z5zKLNXB?= =?utf-8?q?hyLRVSDfPwQGT25MQTOkOhBb95gWC4cMv0dIIo+n83goKqNhGVtn0hoGSAe4liYCj?= =?utf-8?q?WP7HT4oFKou1wDwK7S1ITYOj8SACIR2ugDaSt64cjRuzSP5t5Wzkl7pzCVtvGogi8?= =?utf-8?q?NmS69FELHv6bq4r645cymmYrhmUNRRHL1fBFNbxVgrZ6kA/Ov793aUQx8Q4A5vBVR?= =?utf-8?q?5OIzYa8dCFAl?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b5c96464-778e-4563-e086-08dd1a267f84 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:58:00.8211 (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: 1lOlnrQ6Rew14b5qaCep7jMOVKiOcCji09xhkIV2XiM6h7iMlb564UYTqyHFerdhtPvD4BsoiwLaUJ/jhP6H8A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB7139 |
Series |
PCI: EP: Add RC-to-EP doorbell with platform MSI controller
|
expand
|
diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index e432b6a12a32f..e63652604b621 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -231,6 +231,9 @@ enum { /* Irq domain must destroy generic chips when removed */ IRQ_DOMAIN_FLAG_DESTROY_GC = (1 << 10), + /* Address and data pair is mutable when irq_set_affinity() */ + IRQ_DOMAIN_FLAG_MSI_IMMUTABLE = (1 << 11), + /* * Flags starting from IRQ_DOMAIN_FLAG_NONCORE are reserved * for implementation specific purposes and ignored by the @@ -692,6 +695,11 @@ static inline bool irq_domain_is_msi_device(struct irq_domain *domain) return domain->flags & IRQ_DOMAIN_FLAG_MSI_DEVICE; } +static inline bool irq_domain_is_msi_immutable(struct irq_domain *domain) +{ + return domain->flags & IRQ_DOMAIN_FLAG_MSI_IMMUTABLE; +} + #else /* CONFIG_IRQ_DOMAIN_HIERARCHY */ static inline int irq_domain_alloc_irqs(struct irq_domain *domain, unsigned int nr_irqs, int node, void *arg)
Add the flag IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and the API function irq_domain_is_msi_immutable() to check if the MSI controller retains an immutable address/data pair during irq_set_affinity(). Ensure compatibility with MSI users like PCIe Endpoint Doorbell, which require the address/data pair to remain unchanged after setup. Use this function to verify if the MSI controller is immutable. Signed-off-by: Frank Li <Frank.Li@nxp.com> --- Change from v11 to v12 - change to IRQ_DOMAIN_FLAG_MSI_IMMUTABLE to minimized the code change. Thomas Gleixner: I move IRQ_DOMAIN_FLAG_MSI_IMMUTABLE to irqdomain.h to simplify helper function's implement. But I am not sure if it is reasonable. If you have any concern, let me know. --- include/linux/irqdomain.h | 8 ++++++++ 1 file changed, 8 insertions(+)