From patchwork Wed Apr 10 22:13:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1922250 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=DhJbhlIg; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45d1:ec00::1; helo=ny.mirrors.kernel.org; envelope-from=linux-pci+bounces-6090-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [IPv6:2604:1380:45d1:ec00::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VFHCk1yhgz1yY8 for ; Thu, 11 Apr 2024 08:13:38 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 377681C21AAF for ; Wed, 10 Apr 2024 22:13:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B85C2190674; Wed, 10 Apr 2024 22:13:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="DhJbhlIg" X-Original-To: linux-pci@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8C3FB19066E; Wed, 10 Apr 2024 22:13:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787198; cv=none; b=L9lyCHuXwzsnZM7ZFBhfmRZ+zi56g8kFZ1eQHuI5a0FAi0fa4nRryEjGgcjLulasYFmSri82Tg/IIitDpXeC9aXUD9kVaSjFkumdf31UrKlNSXo36xfK7VUYkfoRqitUz3W5VDQDl2TbjLhyZ9IC0vYc1RIvfIYGRY9u+3M9OGU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787198; c=relaxed/simple; bh=LMCkQbnW2I5WGnGXZOS3NTRS12MF/ECBP2NGHKZbJ6c=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=TAEbvA7ZKD6x7Ka3IKo2oz/ni0QmiywWsLzCX6BfN2mu5Kl0th2rGK3iJT73eLMcArYnKSWe0goAyteXmX+wA07W1B9cqnxZ2HbubGrH1E6C+cksoR+AO7jREtYXTyiyHkDg0nHez91cf74I4IpsIC3TTkMufpFmomqjUSpyRLo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=DhJbhlIg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D95A4C433C7; Wed, 10 Apr 2024 22:13:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712787198; bh=LMCkQbnW2I5WGnGXZOS3NTRS12MF/ECBP2NGHKZbJ6c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DhJbhlIgiyG3cvd73xQPqKhSqelnts7yNWcvULFDB0z6+ey+Hyrgavk4AtRdvT3MW sr9cE5JpTnTXUlMZ0N7S8euyrT9ZJS2HQNYhDPrrObSaqt8+ZQanKKnu8j9vNsyX0s ysrZ8rPpy9lvbO+WbcIdOTykTaLMGAADBeN8fqhufksz7rtDN7ksnyrq9YNHjW5Uog 9ZngjmsSdSJOaxsacq/sV8p1mSfoGsNKFACAM8FJGq3HMYTLLYLIEHw0XmS//pzqJl 96AW+VlYBpApwPl54DHWT1lvzx/cZWB5YkkZ0y35R/Y8SHsyAPc9YY5UK9Dg+C+IOT q8XV8EABKuOyg== From: Bjorn Helgaas To: linux-pci@vger.kernel.org, Joerg Roedel , Will Deacon Cc: Thomas Gleixner , Kevin Tian , Marc Zyngier , Reinette Chatre , Jason Gunthorpe , Alex Williamson , Dave Jiang , Megha Dey , Suravee Suthikulpanit , Robin Murphy , David Woodhouse , Lu Baolu , iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH v2 1/7] Revert "PCI/MSI: Provide stubs for IMS functions" Date: Wed, 10 Apr 2024 17:13:01 -0500 Message-Id: <20240410221307.2162676-2-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240410221307.2162676-1-helgaas@kernel.org> References: <20240410221307.2162676-1-helgaas@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Bjorn Helgaas This reverts commit 41efa431244f6498833ff8ee8dde28c4924c5479. IMS (Interrupt Message Store) support appeared in v6.2, but there are no users yet. Remove it for now. We can add it back when a user comes along. If this is re-added later, this could be squashed with these commits: 0194425af0c8 ("PCI/MSI: Provide IMS (Interrupt Message Store) support") c9e5bea27383 ("PCI/MSI: Provide pci_ims_alloc/free_irq()") which added the non-stub implementations. Signed-off-by: Bjorn Helgaas Reviewed-by: Kevin Tian --- include/linux/pci.h | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index 16493426a04f..abbef75b2b92 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -1658,8 +1658,6 @@ struct msix_entry { u16 entry; /* Driver uses to specify entry, OS writes */ }; -struct msi_domain_template; - #ifdef CONFIG_PCI_MSI int pci_msi_vec_count(struct pci_dev *dev); void pci_disable_msi(struct pci_dev *dev); @@ -1692,11 +1690,6 @@ void pci_msix_free_irq(struct pci_dev *pdev, struct msi_map map); void pci_free_irq_vectors(struct pci_dev *dev); int pci_irq_vector(struct pci_dev *dev, unsigned int nr); const struct cpumask *pci_irq_get_affinity(struct pci_dev *pdev, int vec); -bool pci_create_ims_domain(struct pci_dev *pdev, const struct msi_domain_template *template, - unsigned int hwsize, void *data); -struct msi_map pci_ims_alloc_irq(struct pci_dev *pdev, union msi_instance_cookie *icookie, - const struct irq_affinity_desc *affdesc); -void pci_ims_free_irq(struct pci_dev *pdev, struct msi_map map); #else static inline int pci_msi_vec_count(struct pci_dev *dev) { return -ENOSYS; } @@ -1760,25 +1753,6 @@ static inline const struct cpumask *pci_irq_get_affinity(struct pci_dev *pdev, { return cpu_possible_mask; } - -static inline bool pci_create_ims_domain(struct pci_dev *pdev, - const struct msi_domain_template *template, - unsigned int hwsize, void *data) -{ return false; } - -static inline struct msi_map pci_ims_alloc_irq(struct pci_dev *pdev, - union msi_instance_cookie *icookie, - const struct irq_affinity_desc *affdesc) -{ - struct msi_map map = { .index = -ENOSYS, }; - - return map; -} - -static inline void pci_ims_free_irq(struct pci_dev *pdev, struct msi_map map) -{ -} - #endif /** @@ -2690,6 +2664,14 @@ static inline bool pci_is_thunderbolt_attached(struct pci_dev *pdev) void pci_uevent_ers(struct pci_dev *pdev, enum pci_ers_result err_type); #endif +struct msi_domain_template; + +bool pci_create_ims_domain(struct pci_dev *pdev, const struct msi_domain_template *template, + unsigned int hwsize, void *data); +struct msi_map pci_ims_alloc_irq(struct pci_dev *pdev, union msi_instance_cookie *icookie, + const struct irq_affinity_desc *affdesc); +void pci_ims_free_irq(struct pci_dev *pdev, struct msi_map map); + #include #define pci_printk(level, pdev, fmt, arg...) \ From patchwork Wed Apr 10 22:13:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1922252 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=k7AL//34; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=linux-pci+bounces-6091-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [IPv6:2604:1380:45e3:2400::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VFHCy3t3sz1yY8 for ; Thu, 11 Apr 2024 08:13:50 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id D305528789A for ; Wed, 10 Apr 2024 22:13:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 39471190695; Wed, 10 Apr 2024 22:13:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="k7AL//34" X-Original-To: linux-pci@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1045E190691; Wed, 10 Apr 2024 22:13:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787200; cv=none; b=IKYYkjSp5SypGxZeMGgDIzxksHkUmIj6eslvmSWDKUkcqY3rl4irK5En3p0bAahlsGl02e+k7iXQnYWar47VrIvdSrFyfdkAnbqeRZCKjiSMrNjEPFEnbv9fJ3GujFGoPRnAr2x6rdEFJsLQgyMw6G+piugdrNFVVSAudZZRCz4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787200; c=relaxed/simple; bh=vXdvLxzg6tPLALkBtcaM7WqR73Z1FvDR7DPdIR3tcOM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=cHuIP5yvh3b1efditJI6yUbEovy9FtXUuP0BJOEguXZQjv6jSTj5MqCQpSYN0NfS/frmUl/JMkUVROSFtIrTr9ffcS+g4RjTeHV0N9ZjxM7Mu7SKoqQcqmBktk8OYzZ8nuQzIQ4ZlKDNRcPjfpo/7pD5K1iV4sDW+1SN4aAq5zo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=k7AL//34; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA31AC433C7; Wed, 10 Apr 2024 22:13:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712787199; bh=vXdvLxzg6tPLALkBtcaM7WqR73Z1FvDR7DPdIR3tcOM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=k7AL//343t7hQV+zGTg1RZrW7D/EXBa2/GDB51CVRrl8tW10CSK42D1KwThmhMXS4 PWx9xQvBOUHPnwM3adLM0HxvGGfX7jMQW7zZgbJqEzJ0ab8Tyg7SJXxT3CQu21kzWj vD/9Jr9/13aHEPDKFZm/qXE0KiUU/4Lu03yn6nyjaLlk3GTR7qAzqEKYtNBoIVVIUx BGmaWRFKoZR7m1JsmGWFLMyTj6GTysLL5YG7fjfq137LTqLX4gK2J9vRWlJDhb7Agl 09YErmUxeFSPDMg2MzoDQn1AeTDA0+eUZbTyJtJqggUeE7KTMxdB040RL7jOcdBK2w xIeAKbKuBHD0Q== From: Bjorn Helgaas To: linux-pci@vger.kernel.org, Joerg Roedel , Will Deacon Cc: Thomas Gleixner , Kevin Tian , Marc Zyngier , Reinette Chatre , Jason Gunthorpe , Alex Williamson , Dave Jiang , Megha Dey , Suravee Suthikulpanit , Robin Murphy , David Woodhouse , Lu Baolu , iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH v2 2/7] Revert "PCI/MSI: Provide pci_ims_alloc/free_irq()" Date: Wed, 10 Apr 2024 17:13:02 -0500 Message-Id: <20240410221307.2162676-3-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240410221307.2162676-1-helgaas@kernel.org> References: <20240410221307.2162676-1-helgaas@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Bjorn Helgaas This reverts commit c9e5bea273834a63b5e9ba90ad94b305ba50704e. IMS (Interrupt Message Store) support appeared in v6.2, but there are no users yet. Remove it for now. We can add it back when a user comes along. If this is re-added later, the relevant part of 41efa431244f ("PCI/MSI: Provide stubs for IMS functions") should be squashed into it. Signed-off-by: Bjorn Helgaas Reviewed-by: Kevin Tian --- drivers/pci/msi/api.c | 50 ------------------------------------------- include/linux/pci.h | 3 --- 2 files changed, 53 deletions(-) diff --git a/drivers/pci/msi/api.c b/drivers/pci/msi/api.c index be679aa5db64..3c1cd29c5cf2 100644 --- a/drivers/pci/msi/api.c +++ b/drivers/pci/msi/api.c @@ -365,56 +365,6 @@ const struct cpumask *pci_irq_get_affinity(struct pci_dev *dev, int nr) } EXPORT_SYMBOL(pci_irq_get_affinity); -/** - * pci_ims_alloc_irq - Allocate an interrupt on a PCI/IMS interrupt domain - * @dev: The PCI device to operate on - * @icookie: Pointer to an IMS implementation specific cookie for this - * IMS instance (PASID, queue ID, pointer...). - * The cookie content is copied into the MSI descriptor for the - * interrupt chip callbacks or domain specific setup functions. - * @affdesc: Optional pointer to an interrupt affinity descriptor - * - * There is no index for IMS allocations as IMS is an implementation - * specific storage and does not have any direct associations between - * index, which might be a pure software construct, and device - * functionality. This association is established by the driver either via - * the index - if there is a hardware table - or in case of purely software - * managed IMS implementation the association happens via the - * irq_write_msi_msg() callback of the implementation specific interrupt - * chip, which utilizes the provided @icookie to store the MSI message in - * the appropriate place. - * - * Return: A struct msi_map - * - * On success msi_map::index contains the allocated index (>= 0) and - * msi_map::virq the allocated Linux interrupt number (> 0). - * - * On fail msi_map::index contains the error code and msi_map::virq - * is set to 0. - */ -struct msi_map pci_ims_alloc_irq(struct pci_dev *dev, union msi_instance_cookie *icookie, - const struct irq_affinity_desc *affdesc) -{ - return msi_domain_alloc_irq_at(&dev->dev, MSI_SECONDARY_DOMAIN, MSI_ANY_INDEX, - affdesc, icookie); -} -EXPORT_SYMBOL_GPL(pci_ims_alloc_irq); - -/** - * pci_ims_free_irq - Allocate an interrupt on a PCI/IMS interrupt domain - * which was allocated via pci_ims_alloc_irq() - * @dev: The PCI device to operate on - * @map: A struct msi_map describing the interrupt to free as - * returned from pci_ims_alloc_irq() - */ -void pci_ims_free_irq(struct pci_dev *dev, struct msi_map map) -{ - if (WARN_ON_ONCE(map.index < 0 || map.virq <= 0)) - return; - msi_domain_free_irqs_range(&dev->dev, MSI_SECONDARY_DOMAIN, map.index, map.index); -} -EXPORT_SYMBOL_GPL(pci_ims_free_irq); - /** * pci_free_irq_vectors() - Free previously allocated IRQs for a device * @dev: the PCI device to operate on diff --git a/include/linux/pci.h b/include/linux/pci.h index abbef75b2b92..3deb3e42d990 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2668,9 +2668,6 @@ struct msi_domain_template; bool pci_create_ims_domain(struct pci_dev *pdev, const struct msi_domain_template *template, unsigned int hwsize, void *data); -struct msi_map pci_ims_alloc_irq(struct pci_dev *pdev, union msi_instance_cookie *icookie, - const struct irq_affinity_desc *affdesc); -void pci_ims_free_irq(struct pci_dev *pdev, struct msi_map map); #include From patchwork Wed Apr 10 22:13:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1922253 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=CHPI+RsH; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org; envelope-from=linux-pci+bounces-6092-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VFHDN0ZcNz1yY8 for ; Thu, 11 Apr 2024 08:14:12 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2B26E1F23A8D for ; Wed, 10 Apr 2024 22:14:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 714AB194C7B; Wed, 10 Apr 2024 22:13:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CHPI+RsH" X-Original-To: linux-pci@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45B36184107; Wed, 10 Apr 2024 22:13:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787202; cv=none; b=HwLjjA49XtgLfDXxNh7nEgyW8mkS8BlWaHCfJ2PHBnLGpAhxuTeqqzeLX/ygq+K0E6OH6MgUjJFXleoaNlJK0ktfUVSr6kJUE1bJiVGKMBYIGuF3wSo3Dn2H9wRswvCzaOoKbbFIe3LNO0RBbYFgY8uILO0qO9WEMMbRn3pVA0M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787202; c=relaxed/simple; bh=1PLUZkZ+UYcL+67Y6uWNqq+qHl2vJs0y02TfeBgV6cE=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=IGhm8CDi/zccEpqyjuZvof4BIKCkaDS20GgR9hLaKI6FZwZY9c4daWvBawo4JzMXxCY66qiumhZ9NJwhaSzCGUwAX9rKsEVzHwD86UaU4Sxu9TurL4001k7kEiWFWMEQbDXR3ut4Yuvfq4Is6mgwyRRg+5UMX76VHWrwWGVp1qU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CHPI+RsH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84075C433C7; Wed, 10 Apr 2024 22:13:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712787201; bh=1PLUZkZ+UYcL+67Y6uWNqq+qHl2vJs0y02TfeBgV6cE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CHPI+RsHTpEi1qrodoFGb1o5Ggg99/asKny9tfjlY22MTAgS9+KByTkPrp6Uvr3JE hX2eqGUT3o9FlAOL1+Z07G9TvbfizTQLMfqsWltq4r09dFbqeQidRkhaBY114JbaBn tnAQFqWnSExMCNtiQuINCo4c/CYs/q2EGk/1DdJJMpjQGWrHpboX4Ic5vbj7OcpD6H u+/9PJG1OXG0f0OxpiySauOKCui9cxWfX84qxJCfhBEnUYhL75rKleNh8VRntp+4EJ LkUpb4PvjLrg6nr8NGbxtD+YvAcr/l+MioWae+viroGlFL6yUzKQJ7bmZVhAvWkHG/ xt7SVF8CVzOrg== From: Bjorn Helgaas To: linux-pci@vger.kernel.org, Joerg Roedel , Will Deacon Cc: Thomas Gleixner , Kevin Tian , Marc Zyngier , Reinette Chatre , Jason Gunthorpe , Alex Williamson , Dave Jiang , Megha Dey , Suravee Suthikulpanit , Robin Murphy , David Woodhouse , Lu Baolu , iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH v2 3/7] Revert "PCI/MSI: Provide IMS (Interrupt Message Store) support" Date: Wed, 10 Apr 2024 17:13:03 -0500 Message-Id: <20240410221307.2162676-4-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240410221307.2162676-1-helgaas@kernel.org> References: <20240410221307.2162676-1-helgaas@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Bjorn Helgaas This reverts commit 0194425af0c87acaad457989a2c6d90dba58e776. IMS (Interrupt Message Store) support appeared in v6.2, but there are no users yet. Remove it for now. We can add it back when a user comes along. If this is re-added later, the relevant part of 41efa431244f ("PCI/MSI: Provide stubs for IMS functions") should be squashed into it. Signed-off-by: Bjorn Helgaas Reviewed-by: Kevin Tian --- drivers/pci/msi/irqdomain.c | 59 ------------------------------------- include/linux/pci.h | 5 ---- 2 files changed, 64 deletions(-) diff --git a/drivers/pci/msi/irqdomain.c b/drivers/pci/msi/irqdomain.c index cfd84a899c82..03d2dd25790d 100644 --- a/drivers/pci/msi/irqdomain.c +++ b/drivers/pci/msi/irqdomain.c @@ -355,65 +355,6 @@ bool pci_msi_domain_supports(struct pci_dev *pdev, unsigned int feature_mask, return (supported & feature_mask) == feature_mask; } -/** - * pci_create_ims_domain - Create a secondary IMS domain for a PCI device - * @pdev: The PCI device to operate on - * @template: The MSI info template which describes the domain - * @hwsize: The size of the hardware entry table or 0 if the domain - * is purely software managed - * @data: Optional pointer to domain specific data to be stored - * in msi_domain_info::data - * - * Return: True on success, false otherwise - * - * An IMS domain is expected to have the following constraints: - * - The index space is managed by the core code - * - * - There is no requirement for consecutive index ranges - * - * - The interrupt chip must provide the following callbacks: - * - irq_mask() - * - irq_unmask() - * - irq_write_msi_msg() - * - * - The interrupt chip must provide the following optional callbacks - * when the irq_mask(), irq_unmask() and irq_write_msi_msg() callbacks - * cannot operate directly on hardware, e.g. in the case that the - * interrupt message store is in queue memory: - * - irq_bus_lock() - * - irq_bus_unlock() - * - * These callbacks are invoked from preemptible task context and are - * allowed to sleep. In this case the mandatory callbacks above just - * store the information. The irq_bus_unlock() callback is supposed - * to make the change effective before returning. - * - * - Interrupt affinity setting is handled by the underlying parent - * interrupt domain and communicated to the IMS domain via - * irq_write_msi_msg(). - * - * The domain is automatically destroyed when the PCI device is removed. - */ -bool pci_create_ims_domain(struct pci_dev *pdev, const struct msi_domain_template *template, - unsigned int hwsize, void *data) -{ - struct irq_domain *domain = dev_get_msi_domain(&pdev->dev); - - if (!domain || !irq_domain_is_msi_parent(domain)) - return false; - - if (template->info.bus_token != DOMAIN_BUS_PCI_DEVICE_IMS || - !(template->info.flags & MSI_FLAG_ALLOC_SIMPLE_MSI_DESCS) || - !(template->info.flags & MSI_FLAG_FREE_MSI_DESCS) || - !template->chip.irq_mask || !template->chip.irq_unmask || - !template->chip.irq_write_msi_msg || template->chip.irq_set_affinity) - return false; - - return msi_create_device_irq_domain(&pdev->dev, MSI_SECONDARY_DOMAIN, template, - hwsize, data, NULL); -} -EXPORT_SYMBOL_GPL(pci_create_ims_domain); - /* * Users of the generic MSI infrastructure expect a device to have a single ID, * so with DMA aliases we have to pick the least-worst compromise. Devices with diff --git a/include/linux/pci.h b/include/linux/pci.h index 3deb3e42d990..98fb20bcd054 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2664,11 +2664,6 @@ static inline bool pci_is_thunderbolt_attached(struct pci_dev *pdev) void pci_uevent_ers(struct pci_dev *pdev, enum pci_ers_result err_type); #endif -struct msi_domain_template; - -bool pci_create_ims_domain(struct pci_dev *pdev, const struct msi_domain_template *template, - unsigned int hwsize, void *data); - #include #define pci_printk(level, pdev, fmt, arg...) \ From patchwork Wed Apr 10 22:13:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1922254 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=VIEAJoAo; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=linux-pci+bounces-6093-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [IPv6:2604:1380:45e3:2400::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VFHDc1Vphz1yY8 for ; Thu, 11 Apr 2024 08:14:24 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id E27D6287DDF for ; Wed, 10 Apr 2024 22:14:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 95D84194C9C; Wed, 10 Apr 2024 22:13:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="VIEAJoAo" X-Original-To: linux-pci@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A5DF194C97; Wed, 10 Apr 2024 22:13:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787204; cv=none; b=QGFgnK8P4kMSQ4sOkq6rEcmrmXvayxdsvsE9U9NDJEGtrakM96TkuonMuqFYbxEsk5tPuI7WAuiGeEwilzlg0DwvoSzyQqK9hLe9aLLynHgPGNLUnxG2QGOMU/8wXvWWQsIK+OAnJo418TYW0oZj+6UApES4MfYC+NQp5gIWMJo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787204; c=relaxed/simple; bh=A1NHROTFtfhXnMCORE7OpRKwCzKPX7qMNstag/6FFBU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=k4oE5eDKgz44+dwZhVF5iWTeDG326D+C17XMLxgflwrDS/yvC4rVdCk4KIb5zK4ZCHr6vGoR6TuQF4JSv6JeukdqQDZAIo9DFZTiBc2mi0zK+DL8nG4/pq6yzNRqUuPRgMSbdTYU2M/yIN8832mLwE2n2KKE/ILvHHmmo6S7bXY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=VIEAJoAo; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 99D15C433F1; Wed, 10 Apr 2024 22:13:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712787203; bh=A1NHROTFtfhXnMCORE7OpRKwCzKPX7qMNstag/6FFBU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VIEAJoAoxtvTFxj3zSI8Tppw8LxMJthFez8Zb9wwNwjIP3CipVLrZF5QjMK91xpD8 3U0Nth+9ML4Azr1geRXNdeefP/Z3gY+YIzShr7rj60lKBR+SzG+1j6PzRM9FVVsrfC QspO3du3P4BmyWOZtCYgBu3JIx6/OhF3QQ0rub+/UTSP3IDKnbgoOKDPg89O3HTGPj JK4QvgejURNpBRuh9/k8Ov7nj58Lt28R6ypS+uNFAN6Id4sP2/YLUhk1SytNQs82F6 H5zAWOVYrbP5+v2J7UyCEM3IiR/JmOhOgA3CR30zt36xklo7LN5Zw3rpjmcJrOU4dL cV3GaWDBzhVdQ== From: Bjorn Helgaas To: linux-pci@vger.kernel.org, Joerg Roedel , Will Deacon Cc: Thomas Gleixner , Kevin Tian , Marc Zyngier , Reinette Chatre , Jason Gunthorpe , Alex Williamson , Dave Jiang , Megha Dey , Suravee Suthikulpanit , Robin Murphy , David Woodhouse , Lu Baolu , iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH v2 4/7] Revert "iommu/amd: Enable PCI/IMS" Date: Wed, 10 Apr 2024 17:13:04 -0500 Message-Id: <20240410221307.2162676-5-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240410221307.2162676-1-helgaas@kernel.org> References: <20240410221307.2162676-1-helgaas@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Bjorn Helgaas This reverts commit fa5745aca1dc819aee6463a2475b5c277f7cf8f6. IMS (Interrupt Message Store) support appeared in v6.2, but there are no users yet. Remove it for now. We can add it back when a user comes along. Signed-off-by: Bjorn Helgaas Reviewed-by: Kevin Tian --- drivers/iommu/amd/iommu.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index d35c1b8c8e65..31a1a6686329 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -3701,20 +3701,11 @@ static struct irq_chip amd_ir_chip = { }; static const struct msi_parent_ops amdvi_msi_parent_ops = { - .supported_flags = X86_VECTOR_MSI_FLAGS_SUPPORTED | - MSI_FLAG_MULTI_PCI_MSI | - MSI_FLAG_PCI_IMS, + .supported_flags = X86_VECTOR_MSI_FLAGS_SUPPORTED | MSI_FLAG_MULTI_PCI_MSI, .prefix = "IR-", .init_dev_msi_info = msi_parent_init_dev_msi_info, }; -static const struct msi_parent_ops virt_amdvi_msi_parent_ops = { - .supported_flags = X86_VECTOR_MSI_FLAGS_SUPPORTED | - MSI_FLAG_MULTI_PCI_MSI, - .prefix = "vIR-", - .init_dev_msi_info = msi_parent_init_dev_msi_info, -}; - int amd_iommu_create_irq_domain(struct amd_iommu *iommu) { struct fwnode_handle *fn; @@ -3732,11 +3723,7 @@ int amd_iommu_create_irq_domain(struct amd_iommu *iommu) irq_domain_update_bus_token(iommu->ir_domain, DOMAIN_BUS_AMDVI); iommu->ir_domain->flags |= IRQ_DOMAIN_FLAG_MSI_PARENT | IRQ_DOMAIN_FLAG_ISOLATED_MSI; - - if (amd_iommu_np_cache) - iommu->ir_domain->msi_parent_ops = &virt_amdvi_msi_parent_ops; - else - iommu->ir_domain->msi_parent_ops = &amdvi_msi_parent_ops; + iommu->ir_domain->msi_parent_ops = &amdvi_msi_parent_ops; return 0; } From patchwork Wed Apr 10 22:13:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1922256 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=N6ZHdvF7; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=linux-pci+bounces-6094-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [IPv6:2604:1380:45e3:2400::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VFHDr4yyNz1yY8 for ; Thu, 11 Apr 2024 08:14:36 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 48FCE2843DF for ; Wed, 10 Apr 2024 22:14:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0F14B199E91; Wed, 10 Apr 2024 22:13:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="N6ZHdvF7" X-Original-To: linux-pci@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7906184107; Wed, 10 Apr 2024 22:13:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787206; cv=none; b=eSYWK7PNUcAtgnEnCrRnz4jmTIhtNas8RZdTpv2H2aaa6LhcsWwZgIPcMStsAD69fYM/wWfNeeuc6JtNJxJN9j3jh5w/ub2b/9iPykvs/4rrc/Z2CvTmEdUuoBAJ1C3DdcOeJ6aNkPjOlMuZMoK5oTrKARN4JxVAu/ZJqadD5Zw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787206; c=relaxed/simple; bh=RJiKxlcyGCegqaQL+HqE7i5K68Hg3ohqyMufg3omy84=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=o/1opwhoBR6ct/ptXaB25ucfejDo66hB4/GRyrPvOpw0IVE9atdFx81ntrdZ+FByLAwLqowM4kdA/yFLpqKo/EV34TLsCOQgn8OYbllynvtBrMh+hsc5OvR2KIvlcwwKGHLNmCGCDX7AEzrOBN8eNcnJlWieGNCwGvsYXByxMt0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=N6ZHdvF7; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 84334C43394; Wed, 10 Apr 2024 22:13:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712787205; bh=RJiKxlcyGCegqaQL+HqE7i5K68Hg3ohqyMufg3omy84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=N6ZHdvF7JeFLdHTQ1zMWQqYza3Nb4LURnzbLxAIp2wE1d0OibGmumt6HBKqmtyEn/ P47MQOzi+20VOWXGqpgvYuYump7b8wFabknlsXMEar6PhNiLKAi2jScCfVw/JfNQRh IydS61CS6TQ7vnQ5B83xr2zThJq6hyfERIeSNCHoQi027foC7D/wr4PiSIap5sVoS+ hxTaD6qZxsCd1CoaLDhnbNZv42uKJOWv/QmJLKyzBfbPhKPHaNJ2FTwUQYZ/N95ib8 BuKFZVfcozq1Nlh2hrccuYd0MuJeorXzAxHtzNEyPK3UicpI/qDjlIxyQE4kOcR8gD 0/CUX7QV/0flQ== From: Bjorn Helgaas To: linux-pci@vger.kernel.org, Joerg Roedel , Will Deacon Cc: Thomas Gleixner , Kevin Tian , Marc Zyngier , Reinette Chatre , Jason Gunthorpe , Alex Williamson , Dave Jiang , Megha Dey , Suravee Suthikulpanit , Robin Murphy , David Woodhouse , Lu Baolu , iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH v2 5/7] Revert "iommu/vt-d: Enable PCI/IMS" Date: Wed, 10 Apr 2024 17:13:05 -0500 Message-Id: <20240410221307.2162676-6-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240410221307.2162676-1-helgaas@kernel.org> References: <20240410221307.2162676-1-helgaas@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Bjorn Helgaas This reverts commit 810531a1af5393f010d6508b1cb48e6650fc5e8f. IMS (Interrupt Message Store) support appeared in v6.2, but there are no users yet. Remove it for now. We can add it back when a user comes along. Signed-off-by: Bjorn Helgaas Reviewed-by: Kevin Tian --- drivers/iommu/intel/irq_remapping.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/iommu/intel/irq_remapping.c b/drivers/iommu/intel/irq_remapping.c index 566297bc87dd..0f64fa72ac4f 100644 --- a/drivers/iommu/intel/irq_remapping.c +++ b/drivers/iommu/intel/irq_remapping.c @@ -82,7 +82,7 @@ static const struct irq_domain_ops intel_ir_domain_ops; static void iommu_disable_irq_remapping(struct intel_iommu *iommu); static int __init parse_ioapics_under_ir(void); -static const struct msi_parent_ops dmar_msi_parent_ops, virt_dmar_msi_parent_ops; +static const struct msi_parent_ops dmar_msi_parent_ops; static bool ir_pre_enabled(struct intel_iommu *iommu) { @@ -567,11 +567,7 @@ static int intel_setup_irq_remapping(struct intel_iommu *iommu) irq_domain_update_bus_token(iommu->ir_domain, DOMAIN_BUS_DMAR); iommu->ir_domain->flags |= IRQ_DOMAIN_FLAG_MSI_PARENT | IRQ_DOMAIN_FLAG_ISOLATED_MSI; - - if (cap_caching_mode(iommu->cap)) - iommu->ir_domain->msi_parent_ops = &virt_dmar_msi_parent_ops; - else - iommu->ir_domain->msi_parent_ops = &dmar_msi_parent_ops; + iommu->ir_domain->msi_parent_ops = &dmar_msi_parent_ops; ir_table->base = page_address(pages); ir_table->bitmap = bitmap; @@ -1421,20 +1417,11 @@ static const struct irq_domain_ops intel_ir_domain_ops = { }; static const struct msi_parent_ops dmar_msi_parent_ops = { - .supported_flags = X86_VECTOR_MSI_FLAGS_SUPPORTED | - MSI_FLAG_MULTI_PCI_MSI | - MSI_FLAG_PCI_IMS, + .supported_flags = X86_VECTOR_MSI_FLAGS_SUPPORTED | MSI_FLAG_MULTI_PCI_MSI, .prefix = "IR-", .init_dev_msi_info = msi_parent_init_dev_msi_info, }; -static const struct msi_parent_ops virt_dmar_msi_parent_ops = { - .supported_flags = X86_VECTOR_MSI_FLAGS_SUPPORTED | - MSI_FLAG_MULTI_PCI_MSI, - .prefix = "vIR-", - .init_dev_msi_info = msi_parent_init_dev_msi_info, -}; - /* * Support of Interrupt Remapping Unit Hotplug */ From patchwork Wed Apr 10 22:13:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1922257 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=ed20BydI; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=147.75.199.223; helo=ny.mirrors.kernel.org; envelope-from=linux-pci+bounces-6095-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VFHFF0gGzz1yY8 for ; Thu, 11 Apr 2024 08:14:57 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 407341C2263E for ; Wed, 10 Apr 2024 22:14:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5AC85199EB8; Wed, 10 Apr 2024 22:13:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ed20BydI" X-Original-To: linux-pci@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E360184130; Wed, 10 Apr 2024 22:13:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787208; cv=none; b=vB03qICrCUws7a8JcOBL/OIETT8d+eKF7zL9EWu/kQshE6vYcz3I9tk9jK4/m12zwRFCyUv43v0wRhZ7O/MpoxmZb6S13ZIqisfTwWEn+rVRQ2Y6opAlnfsOXf0GK1b7IQEKrGtUn5DO7wLFcfs2BR8QwE+miF2551V7P64Hau0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787208; c=relaxed/simple; bh=PaJ019h4kLduZMdsA1yUINP29qV1vFhm6+0bkH9w0pI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=DfCUrybNV++KeaiUjHjyECGa+3YmtLvhVF2YUjv7k9ZnL2MLJ5QL3tdslFPEDIqgWx0PIXVTkHJ+XtOdoztOcoofazz4DvbJIB2Fp9e+2pxiuX1tjE0e6QWdyLnwDbXDwvKcOizpSiWkAxckA/usBWZ75xYVokVPdRzV/2OA2oA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ed20BydI; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6125CC433F1; Wed, 10 Apr 2024 22:13:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712787207; bh=PaJ019h4kLduZMdsA1yUINP29qV1vFhm6+0bkH9w0pI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ed20BydIxx38g/cIo+MGjoGCqql8sqZm4qVzRsi8Kr5WY5lmU0cE75nwwXm2lvqM/ 16BPc85fKKgM1OmJAJf+bw/vyTAkTmOGKoCm5xClPpiIoAndpSDjBUGONDJsC2cyg/ H8AfoZQ5SUbuJIgwC9Io1pr8KFWQGmscre2+xslKatP+Fv9+7dKqMkO+R6dH4ZPSVD KZGfkbWYVRR9xQEj7fs86KIpNbAjJPlRc00soqeM+eOdQs+mxvcjqdqgazvGLu1VVo uJGkQNLuBLp/cxFtwV52bgOrierXSEXwef1ke+e+kyTVCF3735uk7+XSirSWi1rLNh jpkZpxzKaM4Lg== From: Bjorn Helgaas To: linux-pci@vger.kernel.org, Joerg Roedel , Will Deacon Cc: Thomas Gleixner , Kevin Tian , Marc Zyngier , Reinette Chatre , Jason Gunthorpe , Alex Williamson , Dave Jiang , Megha Dey , Suravee Suthikulpanit , Robin Murphy , David Woodhouse , Lu Baolu , iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH v2 6/7] Revert "x86/apic/msi: Enable PCI/IMS" Date: Wed, 10 Apr 2024 17:13:06 -0500 Message-Id: <20240410221307.2162676-7-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240410221307.2162676-1-helgaas@kernel.org> References: <20240410221307.2162676-1-helgaas@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Bjorn Helgaas This reverts commit 6e24c887732901140f4e82ba2315c2e15f06f1d6. IMS (Interrupt Message Store) support appeared in v6.2, but there are no users yet. Remove it for now. We can add it back when a user comes along. Signed-off-by: Bjorn Helgaas Reviewed-by: Kevin Tian --- arch/x86/kernel/apic/msi.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/arch/x86/kernel/apic/msi.c b/arch/x86/kernel/apic/msi.c index d9651f15ae4f..340769242dea 100644 --- a/arch/x86/kernel/apic/msi.c +++ b/arch/x86/kernel/apic/msi.c @@ -184,7 +184,6 @@ 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: @@ -229,10 +228,6 @@ 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; From patchwork Wed Apr 10 22:13:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 1922259 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=lgeTToln; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:45e3:2400::1; helo=sv.mirrors.kernel.org; envelope-from=linux-pci+bounces-6096-incoming=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org [IPv6:2604:1380:45e3:2400::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VFHFS4mQLz1yYQ for ; Thu, 11 Apr 2024 08:15:08 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 69B0F2837B1 for ; Wed, 10 Apr 2024 22:15:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D908019DF4F; Wed, 10 Apr 2024 22:13:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="lgeTToln" X-Original-To: linux-pci@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD5DB184134; Wed, 10 Apr 2024 22:13:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787209; cv=none; b=k5H7GvROlM5BjlyeE9+Z8SUW3sqebI408tlsrCAUOUuj/j0Q+PnJxx+2qOLqCRR9jh30sl1EUWvtskJU2P+VdqFXGj30XCYSgORG6DIjBH5H4SI1nE/GnizGwoxUVKGCtAvuC9gTkPgqeF2nfNuLO+4HM1LpjycsFosBNRuh9z8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712787209; c=relaxed/simple; bh=5nbfHeG60eNzQJI5iVciR/vfXygkXSoILlSxcVaWD5Q=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=StkHtUXaGvrUrJYq/CuK0YVed7viggIj9C8hdKuPxQjmTgngPZN1l/UpC/4m69xXu4Gyb11fwG/g9c1TQXbQRolz2Nz2YnAETCm8ErKl4/kV0SOh5Ixxqr0Jq8uDq5PkVGhe1HKWQRt2udzdjPTnpHW25BaF/VPzuiDeAOi6FRs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=lgeTToln; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 54C25C433F1; Wed, 10 Apr 2024 22:13:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712787209; bh=5nbfHeG60eNzQJI5iVciR/vfXygkXSoILlSxcVaWD5Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lgeTTolnYlCAy8OAzdiKscXxM/dzYw15RbiM3PYRgReAZHNbB4uWRykeO5TnX+B9d T0hnL0JSff3HCkBFR1loHcYyJQcsrTB2OrX/20n+ga5yTsvDagkUyUxszEhr9DphZ+ 6vgaxNTTpN2CgruYbgNVDXCbYz1/cDOs7LFinWBik7WSiHNeQzKa1LlvfRId+gkekb d2C7n1vP7dJJ6FvCtzmYp8wFKZaEwReUkBPRfuY9s0N4HddmTiyQJHCCTb56uDRpvF DyCuN4wF0r85D+0olwK5kPOBeuO3enpcR8TUfYbgwN6EES7b9zgY0QO+IaaeByTcXN 5TDPoDvTo61cg== From: Bjorn Helgaas To: linux-pci@vger.kernel.org, Joerg Roedel , Will Deacon Cc: Thomas Gleixner , Kevin Tian , Marc Zyngier , Reinette Chatre , Jason Gunthorpe , Alex Williamson , Dave Jiang , Megha Dey , Suravee Suthikulpanit , Robin Murphy , David Woodhouse , Lu Baolu , iommu@lists.linux.dev, linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH v2 7/7] Revert "genirq/msi: Provide constants for PCI/IMS support" Date: Wed, 10 Apr 2024 17:13:07 -0500 Message-Id: <20240410221307.2162676-8-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240410221307.2162676-1-helgaas@kernel.org> References: <20240410221307.2162676-1-helgaas@kernel.org> Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Bjorn Helgaas This reverts commit e23d4192bf9b612bce5b24f22719fd3cc6edaa69. IMS (Interrupt Message Store) support appeared in v6.2, but there are no users yet. Remove it for now. We can add it back when a user comes along. Signed-off-by: Bjorn Helgaas Reviewed-by: Kevin Tian --- include/linux/irqdomain_defs.h | 1 - include/linux/msi.h | 2 -- include/linux/msi_api.h | 1 - 3 files changed, 4 deletions(-) diff --git a/include/linux/irqdomain_defs.h b/include/linux/irqdomain_defs.h index 5c1fe6f1fcde..36653e2ee1c9 100644 --- a/include/linux/irqdomain_defs.h +++ b/include/linux/irqdomain_defs.h @@ -25,7 +25,6 @@ enum irq_domain_bus_token { DOMAIN_BUS_PCI_DEVICE_MSIX, DOMAIN_BUS_DMAR, DOMAIN_BUS_AMDVI, - DOMAIN_BUS_PCI_DEVICE_IMS, DOMAIN_BUS_DEVICE_MSI, DOMAIN_BUS_WIRED_TO_MSI, }; diff --git a/include/linux/msi.h b/include/linux/msi.h index 26d07e23052e..84859a9aa091 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -573,8 +573,6 @@ 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 391087ad99b1..5ae72d1912c4 100644 --- a/include/linux/msi_api.h +++ b/include/linux/msi_api.h @@ -15,7 +15,6 @@ struct device; */ enum msi_domain_ids { MSI_DEFAULT_DOMAIN, - MSI_SECONDARY_DOMAIN, MSI_MAX_DEVICE_IRQDOMAINS, };