From patchwork Mon Dec 5 18:25:14 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: 29842 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2409198wrr; Mon, 5 Dec 2022 10:27:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf7BxdJi7njckguVgBtxHKbzdV+0DogjmhkHx69gFMhAJrNZzUp5pY5lQ4NvglfNLh4mp80q X-Received: by 2002:aa7:cd02:0:b0:46c:9536:8598 with SMTP id b2-20020aa7cd02000000b0046c95368598mr6794741edw.123.1670264868797; Mon, 05 Dec 2022 10:27:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670264868; cv=none; d=google.com; s=arc-20160816; b=p0EMAQAit72/vILOUuWW6sTy8PfX0mV8SwGPlP8zORER3TNtWXLU2PAQ2F0Ieub3aG m3AtBi1lqhPGYVRPxYp4+p0EB5vajQa246gUuhR0EYpiGAG4SU0V8Fxf1CP3707UepCB j2AYCm6Pqay25hCJ2Rrehbg0bf5RPwI2++o6NDjuTgVkaaqs3AFvaYJmQdxpiGWh5X5m eKaCNOPMKbAEOCNBokQMgQ8droRa3AzcEJ/jWErXOuPPaE2hP1raU8X22Yy2r23dIsiC Kr7EFSvBicYQJD/rjU11Aftdu2ssAQikbTCdLb2j4fvJ/ECcXfgHyKmEk5Dw3gsiT2O2 W8Zw== 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=mS2z3b1y3oW5O40MVtW9w5wdKrzGp1O/sZM27wOFk5Q=; b=uRwD4osI8fGb90sIGZVZIXQsGKoWgdSWIlwOb9JQLbLQiCHwX/xbpolnOfy1pRG8Cs +oe8APnrT3g2v0+zv4UqhUy+Y2iRVD/7tBQMWd++UpXwa+++mGTjdWSWIkQ0whTsM9VW aAE0bDLdzM4EL43YXm0UobuqfezH9O9c4BA9vgreulYrbK7s/gWStfrJ6TThUR0E/ZZX PxsAVfqF08pwvl6Cjy8sHTUsDQBqy5s2jdSO04fEBMBhsts6wT/RezS8s7QiEBdMYLFK lbkwmNnNqkApHh2t7XjLclo6eu6sRP1Dre9KoOur8iavQWeztjl2MpRQwxAH3krSbhoD oLVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=C15yrtmr; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=2rBB+mQ+; 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 dn16-20020a17090794d000b0078e27f2fbe4si8714268ejc.293.2022.12.05.10.27.25; Mon, 05 Dec 2022 10:27:48 -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=C15yrtmr; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=2rBB+mQ+; 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 S233366AbiLES0u (ORCPT + 99 others); Mon, 5 Dec 2022 13:26:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232444AbiLESZT (ORCPT ); Mon, 5 Dec 2022 13:25:19 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 440C620F45; Mon, 5 Dec 2022 10:25:18 -0800 (PST) Date: Mon, 05 Dec 2022 18:25:14 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670264715; 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=mS2z3b1y3oW5O40MVtW9w5wdKrzGp1O/sZM27wOFk5Q=; b=C15yrtmrQ9pgiKsmzajfvnnQVojxw/4ut3qjQnrf1DgW0GPXRzfpt5Es0G11NUsgCwItsp uJihySnM3eGpwRWH2AE2OkTH/YTf/hKA1CHt1MJyFa2oOp9Q2vafNn62hNyVcJ6cTLowEG Q1/KUt3/n46wMYaPW2IyrtKsrFNVUY0FEpLI8kVaniJf1DTbiSph+C0X+aAr3m8/CfRf+v RqB5z5lLv9H3fnoX6J84XtqFP6X2jAO+r3cnt0svhcwjqxpYKi1Nr9gv1jFdkcExY40H/+ ctL/p879IRPWJIFd6j8RbjJyJUsmee61wsMsdN4uKpXDz/vdqGKVK9jv6fvOkQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670264715; 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=mS2z3b1y3oW5O40MVtW9w5wdKrzGp1O/sZM27wOFk5Q=; b=2rBB+mQ+tyRcL1GpeP4z4pGPLAhX1GZUTDD4T2O8w03ZuDZN0De0jG0ECgiTV2Pv9zsRvS pEnZIAvZQWSb9JDA== 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 BUS_DEVICE_PCI_MSI[X] Cc: Thomas Gleixner , Kevin Tian , Marc Zyngier , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221124232325.917219885@linutronix.de> References: <20221124232325.917219885@linutronix.de> MIME-Version: 1.0 Message-ID: <167026471489.4906.12113430843446895413.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?1750422776581462430?= X-GMAIL-MSGID: =?utf-8?q?1751399654749256722?= The following commit has been merged into the irq/core branch of tip: Commit-ID: 29b2f2cfd3f1fd3638799671c3a6758e13943875 Gitweb: https://git.kernel.org/tip/29b2f2cfd3f1fd3638799671c3a6758e13943875 Author: Thomas Gleixner AuthorDate: Fri, 25 Nov 2022 00:26:02 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 05 Dec 2022 19:21:02 +01:00 genirq/msi: Provide BUS_DEVICE_PCI_MSI[X] Provide new bus tokens for the upcoming per device PCI/MSI and PCI/MSIX interrupt domains. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232325.917219885@linutronix.de --- include/linux/irqdomain_defs.h | 2 ++ kernel/irq/msi.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/include/linux/irqdomain_defs.h b/include/linux/irqdomain_defs.h index 69035b4..b3f4b7e 100644 --- a/include/linux/irqdomain_defs.h +++ b/include/linux/irqdomain_defs.h @@ -21,6 +21,8 @@ enum irq_domain_bus_token { DOMAIN_BUS_TI_SCI_INTA_MSI, DOMAIN_BUS_WAKEUP, DOMAIN_BUS_VMD_MSI, + DOMAIN_BUS_PCI_DEVICE_MSI, + DOMAIN_BUS_PCI_DEVICE_MSIX, }; #endif /* _LINUX_IRQDOMAIN_DEFS_H */ diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 21a7452..0536db7 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -1121,6 +1121,8 @@ static bool msi_check_reservation_mode(struct irq_domain *domain, switch(domain->bus_token) { case DOMAIN_BUS_PCI_MSI: + case DOMAIN_BUS_PCI_DEVICE_MSI: + case DOMAIN_BUS_PCI_DEVICE_MSIX: case DOMAIN_BUS_VMD_MSI: break; default: @@ -1146,6 +1148,8 @@ static int msi_handle_pci_fail(struct irq_domain *domain, struct msi_desc *desc, { switch(domain->bus_token) { case DOMAIN_BUS_PCI_MSI: + case DOMAIN_BUS_PCI_DEVICE_MSI: + case DOMAIN_BUS_PCI_DEVICE_MSIX: case DOMAIN_BUS_VMD_MSI: if (IS_ENABLED(CONFIG_PCI_MSI)) break;