From patchwork Mon Dec 5 21:41:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 29965 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2487916wrr; Mon, 5 Dec 2022 13:46:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf70os8OJ7YR6nHgTiLhUMfSiuTCuoQ8zzRKwlAHQ70shtuT2aMk5Fvz9Rj0Uvp3Dcz/9Vys X-Received: by 2002:a63:f041:0:b0:477:f449:36ba with SMTP id s1-20020a63f041000000b00477f44936bamr40726025pgj.125.1670276766929; Mon, 05 Dec 2022 13:46:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670276766; cv=none; d=google.com; s=arc-20160816; b=gnYi4SmwE00oKOJud+x5x90tL2Xd6Hpi3NMnX4ODHOixCtrX2rrUaYTkZAPo13Urcz qf5wh2C7N4v/Q4hYEoTWp2M3cGvhQz7D7UpKearPbSUWhtIVzzwnbuPZJICrXyzz4yEu PFJGpzIT7ftZVrLMZwnRxZ59KMVQeZGcPz9iVMpoceB7yfhWaVVF2nAuNl40KzZ3kux7 6n/2D48SSnxwTrODxAhjnrtJOcVFS4/BjVGtOUpX+5d8l6tVbB9lQK6LtUvRXsABFDrO xOcNDyDyeDji5M3ucawajHbT5n0nxgrk17N+uklCoAdNhw21oAHO5MBdJNOOdMgbo2Fz EcVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=qZETIdDmjfYeCy0D3lsONaap4DkGkoDJ9L7K3FVnWKA=; b=D2k630b+qMtBK8EgjOTvDDGjWDBVg3edoDPaFuux1Y2fqORHJ+0MdSzX021S4+ekpu wlFlx9p+xXIKHphqrckpjlqJJkvfj5F8FDOfLTI5ydLJSgovm/fiw3dNii73GR9jr5dH vORYrCG++m+ULQWHNgI+6ECVcGcPZC3r/bdV3wjDxj5Ee/W4TVzrJEURxIfyCvOoG8ZN O5+ZNDGVXxQK/oLTw6+YtKv2JeBAY+n4if27XOtHmWtlkXFx5/lXfDoBuTHv7PM1D40l +J+7BgeLonTb+uTDWX8Jter41nXJ7Akx/hzguYtJFAj12GO99QvO3DamPXpAD7zeNkyL 3+Og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Ix6zovcm; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h64-20020a638343000000b00477d51ee8e0si4711728pge.633.2022.12.05.13.45.53; Mon, 05 Dec 2022 13:46:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=Ix6zovcm; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233963AbiLEVmi (ORCPT + 99 others); Mon, 5 Dec 2022 16:42:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233783AbiLEVlx (ORCPT ); Mon, 5 Dec 2022 16:41:53 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 090CA27DE2; Mon, 5 Dec 2022 13:41:52 -0800 (PST) Date: Mon, 05 Dec 2022 21:41:47 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670276507; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qZETIdDmjfYeCy0D3lsONaap4DkGkoDJ9L7K3FVnWKA=; b=Ix6zovcmxiAi3jxnVFYmtLdH5vz6mwZUmDlpi/sFVmqhnqrqn9FjwBvgjvm1rSiJ4YQi22 4m7W22/Tthk4YETRRoEcnO4rW+5an/DPzbX0APiabL6gDBVk6pnE0cZ1461Y3MlOX16vIR CnV3xL5REJLObw6NHyAg6XZJoPIWYL0KmfheKG/KlkOph+Y+cCR8xWNaPR/D9gvZRczoK1 e2eUeFBGDTv3SIosj28iLs/hpp1fy+TApeV/OLHprqO5ZLeGXDLGdGD1cnjB+jc50NuR/A ePMy2VIO1fw/M+9IoF3HJDjvqdrAiBBBEy/Hr7LjPvDA/TNIqvnIUgDfFBKwmA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670276507; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qZETIdDmjfYeCy0D3lsONaap4DkGkoDJ9L7K3FVnWKA=; b=OBe3Fv3HX1BQ4NRfCwkcJKlJTrr9Y6mfoS4Lln/byaPZuFpRDLcFtmqBx2xk0Q7l+4V7pS bbdT4zPALFAi1YCQ== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] genirq/msi: Provide constants for PCI/IMS support Cc: Thomas Gleixner , Kevin Tian , Marc Zyngier , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221124232326.846169830@linutronix.de> References: <20221124232326.846169830@linutronix.de> MIME-Version: 1.0 Message-ID: <167027650717.4906.6017670287416779656.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750426204624888524?= X-GMAIL-MSGID: =?utf-8?q?1751412131229087023?= The following commit has been merged into the irq/core branch of tip: Commit-ID: e23d4192bf9b612bce5b24f22719fd3cc6edaa69 Gitweb: https://git.kernel.org/tip/e23d4192bf9b612bce5b24f22719fd3cc6edaa69 Author: Thomas Gleixner AuthorDate: Fri, 25 Nov 2022 00:26:28 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 05 Dec 2022 22:22:34 +01:00 genirq/msi: Provide constants for PCI/IMS support Provide the necessary constants for PCI/IMS support: - A new bus token for MSI irqdomain identification - A MSI feature flag for the MSI irqdomains to signal support - A secondary domain id The latter expands the device internal domain pointer storage array from 1 to 2 entries. That extra pointer is mostly unused today, but the alternative solutions would not be free either and would introduce more complexity all over the place. Trade the 8bytes for simplicity. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232326.846169830@linutronix.de --- include/linux/irqdomain_defs.h | 1 + include/linux/msi.h | 2 ++ include/linux/msi_api.h | 1 + 3 files changed, 4 insertions(+) diff --git a/include/linux/irqdomain_defs.h b/include/linux/irqdomain_defs.h index 0b2d8a8..c29921f 100644 --- a/include/linux/irqdomain_defs.h +++ b/include/linux/irqdomain_defs.h @@ -25,6 +25,7 @@ enum irq_domain_bus_token { DOMAIN_BUS_PCI_DEVICE_MSIX, DOMAIN_BUS_DMAR, DOMAIN_BUS_AMDVI, + DOMAIN_BUS_PCI_DEVICE_IMS, }; #endif /* _LINUX_IRQDOMAIN_DEFS_H */ diff --git a/include/linux/msi.h b/include/linux/msi.h index 3cb1586..a112b91 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -559,6 +559,8 @@ enum { MSI_FLAG_MSIX_CONTIGUOUS = (1 << 19), /* PCI/MSI-X vectors can be dynamically allocated/freed post MSI-X enable */ MSI_FLAG_PCI_MSIX_ALLOC_DYN = (1 << 20), + /* Support for PCI/IMS */ + MSI_FLAG_PCI_IMS = (1 << 21), }; /** diff --git a/include/linux/msi_api.h b/include/linux/msi_api.h index 5ae72d1..391087a 100644 --- a/include/linux/msi_api.h +++ b/include/linux/msi_api.h @@ -15,6 +15,7 @@ struct device; */ enum msi_domain_ids { MSI_DEFAULT_DOMAIN, + MSI_SECONDARY_DOMAIN, MSI_MAX_DEVICE_IRQDOMAINS, };