Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp52411lqg; Wed, 10 Apr 2024 15:13:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXsYDOTw8R8SvHYYRKMQ+ghcuY2A6dsSwrG6TzBZROr2OKU5BeRiCQJ1pi28+PA6ZfQLWpIgnqeLK1hhgxQkeNgivEykEE3Gi/wyxri1Q== X-Google-Smtp-Source: AGHT+IF9VOaLoZpZY0pAbMSTrJ4mWsDKoN6F63nW8XuYTfMbyqu+/gy473U0GmVBpi8PdGweDNPx X-Received: by 2002:a05:6830:14d3:b0:6ea:122f:3e6b with SMTP id t19-20020a05683014d300b006ea122f3e6bmr3799113otq.35.1712787237553; Wed, 10 Apr 2024 15:13:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712787237; cv=pass; d=google.com; s=arc-20160816; b=i1ssJjSCQqyntHypxbvDCK9I+n/tKcHSJIne55UUBeSiAuQABOZeHxNLj3FOLnB9JV VEDRW4EzrO3WolSEpS/1xx/YRqBDhXuTXvaF6iTMbj4SEU4/aiHc0I8uMUy1lozdXwXM N+82RezJ40xRWDCIOtED7lgGpQZFHt5klgJ8FpWJsFGikFeMc7+3NHBmK70sAeItghlf q5q+O/8V9njj3u/yEgflCnvuw/7RPJdEycA0CUkLYUoNQwTttm+hRzew/3fyZHQKs/zt v+na+X9bRF+WnSzSJ20wkmWezwEQtQ3VFh5s7yO9CB1N7QeCj7vPogsn7F36vZhyw6vc ivRg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=CbqjLC5Q0RxEVttYhzlnHGFKz+StqvaTOaozUmy5KEQ=; fh=vvD7kdj1At6ezffD/IEGPt3u+aV1voPJybHICWUtJ54=; b=hMZjHzw3/GIMFeR3KyhDI+dEwd2Epo5Y/DLR4BWRPBetmLkY2Ro674pFfCeyLoTOxC AqqC4xcntjrlzDZNy8M8nndjcA7H1nVqY3qpsaxdmg0rhbHyRklKalpNJpEacfFFahm2 rkqGwJxS9BXPyaNSw4iGlPwU+MJkSxULgqyxxcY8e/qbUmKpKN9LneEfAr4QZVyU1Zt8 rfFp65oH13iXrXnmWFVNHSzVXtVfQPU6V+KTJ1HSXxUa+2qnvo+VpKZobF8ajOJEw80o VsXFPuRLxYnADqNLEodS6fowlSlBsJ9+x+3mKAu42BFw5fnF9FnlsiaKgR5fjWQvUy24 Q6+w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="k7AL//34"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139414-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139414-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id s18-20020a05620a081200b0078d77f93e76si205727qks.348.2024.04.10.15.13.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 15:13:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139414-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="k7AL//34"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-139414-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139414-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 4888D1C21C43 for ; Wed, 10 Apr 2024 22:13:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ECC17194C65; 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" 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-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 -- 2.34.1