Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1743282lqz; Mon, 1 Apr 2024 16:24:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUMsL6KrpAEmV8ZSH8Wt7cEq3hYCIteV4DprAX8UWpcwT695Ae/e4nYT0Ku9Ga8VmGTbyeSpUeLnanNfCNoI6TdMTR7gzlvt0ZvmqlVJg== X-Google-Smtp-Source: AGHT+IHkEovFVqisSNUdOwVKlvdqtjcqxO0N24WbWi9CmtPfWrGr0qdw2xnrd1GQtF/Ne51M1vA6 X-Received: by 2002:a25:d608:0:b0:dc6:d738:1fa6 with SMTP id n8-20020a25d608000000b00dc6d7381fa6mr9118837ybg.6.1712013858463; Mon, 01 Apr 2024 16:24:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712013858; cv=pass; d=google.com; s=arc-20160816; b=k4TBH4JsGf6eLSh+Ftt3/r1H/Kau9W4dbPEcwoXIgE0qgZIqGYSlh1xo7ryBSZT8ZI EsSdd6oF/orsH4WE+XfP3ZI6CtsRzdyeDeJ0XpZpSkjtfDmsTPfxGPiGX7CocEt8b35y rzniIXdUWBZWwi6G4YQPY6rHIaKZEEiPEcKjGitgWKnpp0ivWSIfh+/x+j/VQxL4BKQz 4DMsd+mNmrfMEZU8qt5/uuYmv5FiEXEsJjaZsLdSRU40PzpaRdSoamv5IDiS7DIFgQ9J RsicRoZSFm0Sx3ANZbv8heAhFnnjM+OZ72B3kiokM7MqwMLOpywH+UR+diNHINSWjWDh Uvcw== 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=P8RY0NERgcuslguDHCPMdL2GQK+/WPXtSxsqaLvgQGM=; fh=J4vjuf4Jr6OOsjUKZwEQoXJ39FK8Od1P+8bfjxpoS2Q=; b=x47jtj/DSbql8/pGdCpnV6x0qeb7OZt7ajubaglSIyezzpHrxM36MNqYoeSw0QesTc xw5klEyP4itbT4qfo5q/WTJbMeoD3U5jj6EP+2AHrYe2QFwdXmonK2jOSGNkKeddPDPX 6b9I9Cro9UPeKANILVYXoTh73t0Tgah1FlWHLSI/4qV2QRRFHGjHKSI91vTvDMuHYXKo Uy7siDD1QMt3Uroz1HVxD3yG6NRBAW9nznVKp7BC2gqRS3IG1K9muoaU4e4/ZDYcX8al lyeUxCPRRVUabEZkcmmZvmgHo7+mDPuaRmuq7agN+ER+2YmhEyaIFi1iE21r0oJqoXnC iJbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="E/1EoP0I"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-127167-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127167-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 wh14-20020a05620a56ce00b00789e73e9e20si10523204qkn.200.2024.04.01.16.24.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 16:24:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-127167-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="E/1EoP0I"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-127167-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-127167-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 0B88B1C21FDB for ; Mon, 1 Apr 2024 23:24:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 96D5B58235; Mon, 1 Apr 2024 23:23:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="E/1EoP0I" 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 B62E85820C; Mon, 1 Apr 2024 23:23:38 +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=1712013818; cv=none; b=IN8my6F4sBkiCUw6SbGDs8zwfcVfrhuWamhLuQXaa3mWV7nwMIq56+PrF2xg1Gmfidcc7BP5pZwnDlevzz9KSUm7cprQ6SOQecRKWXzj6tFtVbeY8BUXLvJLC5QbqiBPAreayCzFV+sqmVTs9QiKsSWiC7UvrtBDG4T/WWlh2pg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712013818; c=relaxed/simple; bh=o97B29Ox7BgnEbRTW2Nrfwi00DuZ+IE+HV46X4xy7oU=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=r5vrTANZb2fbrapRHdMrjTCTYReCD9Y8ht7eRWWC/BFxWtKvDhEBmTRSLXRGCRh+j7OB9MUt/5Zm49jdCMV2N01YRxBJkDvrzvTRg5ieh4ymz2XiwAzJ9R9cASr52/TQLjcS++/CCrnq/PgE3s+9G7kEyr39gPuH7ORZ8yixPZs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=E/1EoP0I; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E762AC433F1; Mon, 1 Apr 2024 23:23:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712013818; bh=o97B29Ox7BgnEbRTW2Nrfwi00DuZ+IE+HV46X4xy7oU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E/1EoP0IXYDHv85d/3dbGXT5dxUHUgg31fFnH7AkV7ApWny81guVKC1FcX5S3nbdO NvJlYZVNbjz9lr5pMuNjldbu1V2uvSdiKaOYESTCKGxyQ64gSoW4gE+ha0VKkUbXmL 0iU6f0QvziuudXdfraHRCKlb2pwSRmp8u4l8wXFxBfgX4dPurNWdl5gLzuhPkiMvcV qX00aIzz8pnLVnpt/wbIjHfoZZu5uRmNbK8HDwEJCeSXGkHo7NeR6F4su0I3PdOxk+ ZFSmsYfkZF+dXC+jSUXni4UEepNoZ5Grz1JLxCXleBOMn+UDzJ7OXsvooSHIFdyagA 1nKybCSHkSEpg== From: Bjorn Helgaas To: linux-pci@vger.kernel.org Cc: Thomas Gleixner , Kevin Tian , Marc Zyngier , Reinette Chatre , Jason Gunthorpe , Alex Williamson , Dave Jiang , Megha Dey , linux-kernel@vger.kernel.org, Bjorn Helgaas Subject: [PATCH 3/3] Revert "PCI/MSI: Provide IMS (Interrupt Message Store) support" Date: Mon, 1 Apr 2024 18:23:26 -0500 Message-Id: <20240401232326.1794707-4-helgaas@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240401232326.1794707-1-helgaas@kernel.org> References: <20240401232326.1794707-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 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 --- 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...) \ -- 2.34.1