From patchwork Mon Dec 5 18:25:10 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: 29825 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2408455wrr; Mon, 5 Dec 2022 10:26:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf62bxh/Wtei+HT0r03gaj23q/3mWqHTaAA7yIFDPgeAjGhSzyl9YBL67dLJKxAxZofkA0F6 X-Received: by 2002:a05:6402:541a:b0:463:be84:5283 with SMTP id ev26-20020a056402541a00b00463be845283mr33045232edb.7.1670264773300; Mon, 05 Dec 2022 10:26:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670264773; cv=none; d=google.com; s=arc-20160816; b=YcdhZobdDKlGIvz0qVWKVUku0fx7gRRYetlqhFK/OrNtw3oJQDq8U74u82oiGYGT9f qa+l89+p7bxT3ATH2I4ps8WDbwpZw9MF7pWJrLa0JLfJbWdOiWXV51OqCt6TlPyfmdEy VyNTn63o1ryEHdva9c0NSOaQq+els4RfZUQoN2hVzIqQB0Z5ftUO44MflNhMQWMLgyjX vtK31ZqS1oLswpnDXn2Ojb3f/bu+hQF0o8biLh9MA+/hTjw3cy7xkFWthl9bQJk2TvRG G5FbyiNN5LKuucuKgoaMwX0JGDwvuRCPEIy9HfWeCVS6gBlw0VRyBVgy+0CK/Oydi/Wn ztMw== 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=EQd2hGgB/yRhWx8RU8z9DPIWHZJG+3iAv+YE6tbXlM8=; b=uC0bW0IKybtSVsytZzjKxYMzlbOncqkrrkwNEDg7hvFoXmvYl4b9DN43cZFqTMCDxI mUFLCcxf2BIILLCSP9NjPyOJvlDdKLSomE6tIz3nWIbrhUrbtJliYcxlZ9VULoeHMzbb jnfMnlXKRcaU1rLJ4Y1TDbwor7AZkR2vIqh3XmC2yLiW+G0ksnlaiwBueDT1yP/1wIup At3fhPyRHeSYNS26i9wplzY1Clos2kkTS7v1iRgpYca+ueV3lMN7QONdJFypiQahHzAC Fj5tocZb3iq30PdV8afBz5+cAfwnhJj35ykeOhzH4MGtC3qPmlgS3U3n6fon21q7Tz6I /X0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=yaCgfjWO; dkim=neutral (no key) header.i=@linutronix.de header.b=ofA3B6cL; 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 3-20020a170906328300b007827639faffsi9872232ejw.760.2022.12.05.10.25.49; Mon, 05 Dec 2022 10:26:13 -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=yaCgfjWO; dkim=neutral (no key) header.i=@linutronix.de header.b=ofA3B6cL; 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 S232801AbiLESZa (ORCPT + 99 others); Mon, 5 Dec 2022 13:25:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232372AbiLESZO (ORCPT ); Mon, 5 Dec 2022 13:25:14 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6AF1220BFD; Mon, 5 Dec 2022 10:25:13 -0800 (PST) Date: Mon, 05 Dec 2022 18:25:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670264711; 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=EQd2hGgB/yRhWx8RU8z9DPIWHZJG+3iAv+YE6tbXlM8=; b=yaCgfjWOHQZLAFdGOBmbN2ctOXS2xjhgmifyUMK+skpfhvh68INHWDevNsa2MrSfRmeWnp TEEWoGqrOG0hy37ptVG/zzGIKIl75ZrlFWd/tQvUCH37s7tNG1+M0vYooCgQfNhyr0LEMX nLmF4jfjpGcVtYWcQiNI+S+e3euJVectvxrgCV2mUwhnDY0arbiY4FwNpXxllk7C8PX0gZ 5SBRpW4Y3R1o6uzaQaXFkMpoymSitfgBm0XmUafHFkzMr5EVojJNIicp/RULT8bVFi1GhX p4gWa6WQCAvm3/wCanj+cmdkBqIA39UWFlKBxi6beG4L5V+ktHXfqlhmIbp/kQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670264711; 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=EQd2hGgB/yRhWx8RU8z9DPIWHZJG+3iAv+YE6tbXlM8=; b=ofA3B6cL8zUWLeuHk2E1Cjnv6RCvL3S1W8CsM5tLEE4nSme44XJ0G8XmFy0CmhJZVheWGq yR9rUdxGQYPu00CQ== 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: <167026471067.4906.13288838482564117896.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?1751399555095402101?= The following commit has been merged into the irq/core branch of tip: Commit-ID: ddd98f1b7b57dad5ae5efbe54154722aa6368b11 Gitweb: https://git.kernel.org/tip/ddd98f1b7b57dad5ae5efbe54154722aa6368b11 Author: Thomas Gleixner AuthorDate: Fri, 25 Nov 2022 00:26:32 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 05 Dec 2022 19:21:04 +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;