From patchwork Mon Dec 5 18:25:11 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: 29826 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2408526wrr; Mon, 5 Dec 2022 10:26:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf5KO0+qLS+dB/vppDp4yxOxDYk+MzLS3kY9TlSdM5U/2LtUTTwonIjWtoC6LXZKa4pr54mK X-Received: by 2002:a05:6402:5c7:b0:469:6e8f:74c1 with SMTP id n7-20020a05640205c700b004696e8f74c1mr57396072edx.334.1670264781288; Mon, 05 Dec 2022 10:26:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670264781; cv=none; d=google.com; s=arc-20160816; b=sZlszrK9amuEg0L0Pphij7bGZnkdQd7RQVMPVlvnQVT9sb/wuwPme3pMrN9ktZHbon /yuVj1opkyKKQOhgr/+6VwJQh4/VinXG06MtSy5a5/OOVqE96ZH2OHaSGUKHVA3iOKi4 1oE/Xv7oYdZXyqvifpFVI+fo0Wj4/gF07HiIbJ5eErTQQD2rNmYMGKYlkvmdfS6p411b CoF/4WDKag3+E05Ossy1MHKI/YtIWMFJtG5BTXN1MpZ/MIPhM5z1xOweRDZNxwieYHEt 5MD/kmyUDGgD0TXFALXHvDtQ9HYzn+xGXpZO8S0XDjTgMF1hhwkxItxrkTT8DnS1D2cG 8pEQ== 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=/4YVlicsbebDUyqkpWB8dSI8GCkOlEELFuVWQfxnV6M=; b=BOt7K1R85dEqHko3kJUvmzYhNTjYfWVL+9xVRhWtttK0VYqfIKAZqBH53iYTcOLTbk NaQM2vVqv4fvPpDisELLiFOSA0JrCkr8E2fSSmutn9P2dK2DuGbMufhKo5LIBwZ3awDV Ox7iHGBr6XbQPjsg5fICf1c3dAcgxIEt2qZZSUVQriIU7TKvUEpVvzOH7uj3cVS+SmHm 5ElCtpQ9LQRhddZSg9ViTKM66TkhrgRsD/ajoSu9g2KCh5zHlrJU+5gpEEY5Xbxep+1e VkoJRh+HM/WyEUa1T4FtuHS8b7OYoIvbnwPtq4wC0mP6SswFrVL1tiY4tV5OI9Nq7KHW iICQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=AhKq1KsB; 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 n9-20020a056402060900b0046830a9c984si126941edv.476.2022.12.05.10.25.58; Mon, 05 Dec 2022 10:26:21 -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=AhKq1KsB; 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 S232941AbiLESZi (ORCPT + 99 others); Mon, 5 Dec 2022 13:25:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232299AbiLESZP (ORCPT ); Mon, 5 Dec 2022 13:25:15 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 34CDE205E8; Mon, 5 Dec 2022 10:25:15 -0800 (PST) Date: Mon, 05 Dec 2022 18:25:11 -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=/4YVlicsbebDUyqkpWB8dSI8GCkOlEELFuVWQfxnV6M=; b=AhKq1KsBx3Qo3CEypn4a6qxMzhA9YLHckDYsfsfZcxqptJo+H8l9rqg67q2sylvuNmW6Tj 09q+kAl1P6m4BgU9fTOrVWr8JXdqt+az2a4IcsoSt3qS50dMtZxTnkWvqxCHupbnc9NB9a IOg72CmoyvY6i9/bM1nNasfmlULB08X9D2KCxPL4pA9aN1bAtiviGSkr7Nc6bR8Z4xTCuv hQCHSRTZEkVDlElsg+57oiS6GuL7VYYnetne42CCUMrMUDqR/nZ6jo0I62d+rsVOVmYOob 9ElQG5Ff8ODlDlGFbA0bZFSRq0wAWLkiuf2biDm4V1BiLME3wtZ8woEZPjhIFQ== 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=/4YVlicsbebDUyqkpWB8dSI8GCkOlEELFuVWQfxnV6M=; b=KAEqgNOoaUcoBTftXLBc+qQnL6XgNP6JnIUq0XGQVrHmx8KGxcBXFZUzssREfN6ya7mg+A eHfDUjPmcpppUuCw== 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: <167026471126.4906.9399889281324229158.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?1751399562992520622?= The following commit has been merged into the irq/core branch of tip: Commit-ID: 52a50e8785c28723c15867a07c5d5ee3b2ed1c25 Gitweb: https://git.kernel.org/tip/52a50e8785c28723c15867a07c5d5ee3b2ed1c25 Author: Thomas Gleixner AuthorDate: Fri, 25 Nov 2022 00:26:28 +01:00 Committer: Thomas Gleixner CommitterDate: Mon, 05 Dec 2022 19:21:04 +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, };