From patchwork Mon Dec 5 21:41:46 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: 29951 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2487295wrr; Mon, 5 Dec 2022 13:44:26 -0800 (PST) X-Google-Smtp-Source: AA0mqf6mw3Uue2vMSjBpZMB5/aKxqr0kgZ1Vv2xA82BaKfWR1LwtXq20VmZoLX3AsONecAhIKJj7 X-Received: by 2002:a17:906:4d88:b0:7c0:bbac:1921 with SMTP id s8-20020a1709064d8800b007c0bbac1921mr14441780eju.530.1670276665875; Mon, 05 Dec 2022 13:44:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670276665; cv=none; d=google.com; s=arc-20160816; b=0R9PBuLlhlwEsqicUaHUUSrWUu1GPF+Z5vXvO0hGesFqaEZ+botyV1i0IrqlEldUTv fPFIZO3GeBiUg6m32cUmqH6mLM24WTWz3+oCtVotIAI7lsPqlB7RcKX++SwFKeCjIbJQ Os97nxv1ldGg4Bxvb8gHI16X1Tsox7+uQAnAHhahyJujdeoZh8G0O0ENfWHyYa+oTptX HF+OeB04mGQGFBAsMd83YXAzmPWIIDh+ZqtyC7zS8NO5pxOc8wxg1pOVCjXWgrF5HOIN lvOQI9sDEQph8wVh6NCTi1ZYQDXRisAbNht6zPlG6y6JVFOXDVdNpx9hgM9DXXzsCF7P /3Rw== 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=YMuezAP66rqkzuy2yUbyb2sa7AAjakuRuAw9B0xk+f8=; b=Q28atauKP+pJs6c5Dc290z4w0dLZDl/aQN+JsQlPNkg3Z+aGwgsqPQJDCnPYTF443I G+MpEjHsVTPenjq6h+Gsc0ERQvWgwnwWoVqNfPAAC3Y+cUYNMi5wqqi7sg1QVn9nhj6+ /PI6Ozt0ArNRnt7knReyDo3bZVLVyqD3bXpGm6SNlcaXsddcqyE6Fgy5aBXOJmPpbktU YW/v8srqVBdOqAWMDEqs1eovvNQg4lg5/xr/Edkha5jJx1Bpq7hok6In2G/u4Y1od1HW 8oAaAkUNW3a1PMepuXNvlqag7xrNb8Ir47pYhSupXOzDybrxFLtJGuNP0EEI906imOHr NZlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=LagEQROH; dkim=neutral (no key) header.i=@linutronix.de; 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 dd19-20020a1709069b9300b0078d48e06641si13397870ejc.393.2022.12.05.13.44.02; Mon, 05 Dec 2022 13:44:25 -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=LagEQROH; dkim=neutral (no key) header.i=@linutronix.de; 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 S233849AbiLEVmV (ORCPT + 99 others); Mon, 5 Dec 2022 16:42:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41042 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233752AbiLEVlu (ORCPT ); Mon, 5 Dec 2022 16:41:50 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8833825EBC; Mon, 5 Dec 2022 13:41:49 -0800 (PST) Date: Mon, 05 Dec 2022 21:41:46 -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=YMuezAP66rqkzuy2yUbyb2sa7AAjakuRuAw9B0xk+f8=; b=LagEQROHbBmPOhQQxiSnilsgweGrohP+zUdTsos4GHPbm+qUgznTewPQ1jmphu9OFHhHJD Le92uXHUu+dDMZWytA9DN6El7MClwsxl4guZKkyDxqimwd2rnPH2WyD0FGWRyfSQAaDb3X 06cRsqydv9YjK5KqnBLJZrU+rQaVM3Ad/AVXN/faWhrDzZmO2zuskUu3K95x5Ax4XtNxfX ahMp3smKyRVcKyEmmK7kzdYiQG18p04DJl4fjLCdHxXrzEbUm6IEqwsToMZ6OMTIbSwHhT 51D5nmYfNacX0QT5LrzVfMUR9UkNjfZSe0F/j9XnxIY5VPP+xoqJcLikH3MrXA== 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=YMuezAP66rqkzuy2yUbyb2sa7AAjakuRuAw9B0xk+f8=; b=hRRhly/vPecrvLbCNQexOW0fzXebrsVHtFZNInL7k3jvwfwO+AWZ4Qp5kPmr7uV+6YIBiI aSV24vF5dVI7sPBQ== 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] x86/apic/msi: Enable PCI/IMS Cc: Thomas Gleixner , Kevin Tian , Marc Zyngier , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221124232327.022658817@linutronix.de> References: <20221124232327.022658817@linutronix.de> MIME-Version: 1.0 Message-ID: <167027650685.4906.17177063208727382656.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?1750427177593251696?= X-GMAIL-MSGID: =?utf-8?q?1751412025271975941?= The following commit has been merged into the irq/core branch of tip: Commit-ID: 6e24c887732901140f4e82ba2315c2e15f06f1d6 Gitweb: https://git.kernel.org/tip/6e24c887732901140f4e82ba2315c2e15f06f1d6 Author: Thomas Gleixner AuthorDate: Fri, 25 Nov 2022 00:26:32 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 05 Dec 2022 22:22:35 +01:00 x86/apic/msi: Enable PCI/IMS Enable IMS in the domain init and allocation mapping code, but do not enable it on the vector domain as discussed in various threads on LKML. The interrupt remap domains can expand this setting like they do with PCI multi MSI. Signed-off-by: Thomas Gleixner Reviewed-by: Kevin Tian Acked-by: Marc Zyngier Link: https://lore.kernel.org/r/20221124232327.022658817@linutronix.de --- arch/x86/kernel/apic/msi.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/kernel/apic/msi.c b/arch/x86/kernel/apic/msi.c index 682f51a..35d5b8f 100644 --- a/arch/x86/kernel/apic/msi.c +++ b/arch/x86/kernel/apic/msi.c @@ -184,6 +184,7 @@ static int x86_msi_prepare(struct irq_domain *domain, struct device *dev, alloc->type = X86_IRQ_ALLOC_TYPE_PCI_MSI; return 0; case DOMAIN_BUS_PCI_DEVICE_MSIX: + case DOMAIN_BUS_PCI_DEVICE_IMS: alloc->type = X86_IRQ_ALLOC_TYPE_PCI_MSIX; return 0; default: @@ -230,6 +231,10 @@ static bool x86_init_dev_msi_info(struct device *dev, struct irq_domain *domain, case DOMAIN_BUS_PCI_DEVICE_MSI: case DOMAIN_BUS_PCI_DEVICE_MSIX: break; + case DOMAIN_BUS_PCI_DEVICE_IMS: + if (!(pops->supported_flags & MSI_FLAG_PCI_IMS)) + return false; + break; default: WARN_ON_ONCE(1); return false;