From patchwork Mon Aug 19 16:51:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13768666 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 B438318A934 for ; Mon, 19 Aug 2024 16:53:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724086402; cv=none; b=mZIdjGJNjbYgkFAalzm1DLo2z+1H6AtjYr5ifhIh+imMU4pWETbfqX+4Uv0RA7nEfAqyBA8MkYsej3kGmTqyHA8iaOVcAFIi9C6OhrPuETwk+s5JAG1/VdO1XTg8NxKgfLiBx0/urhYJ11hfttSJt7nov18TahDl2oKoTrAI0eU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724086402; c=relaxed/simple; bh=HyrnGEiWWKBKUn1JXMJcutJ0LWXBjSFgM/wwpIH/cmo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=X2SJeVDAS3CtV6IYLr+KKXB/dero9GnZlG2KPmfhGKrMMjrtpblNTYC4AhmSZo4LueDWfNzI/E/WItCldIA04N+O+FZ8cZLIoMzyDq33DpCD6FWrUH0KtdxXqLrudrPpgkQzQcoVMnqGi2jdKGpxxU81n7pzTVSmVtML4WgeGbw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=SiN2CoZ+; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SiN2CoZ+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724086399; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RIGjmIxgd4ZYoEGhHZhEaO790wvl9zuuKnu8/dcY7mY=; b=SiN2CoZ+/mlezkqMiokcpCmxDck+etGa5yltFWoOMq1PaaoJKJrmBteUUkjwmGjC7YYhy8 EbPWLbZtUfLuaIrNrkg0oOU8La05HCgMla6cr41KxCHEQ2+ikkG5SDTst26MuvznhL5DHz ZUpyknN/CFfo3mdKpAjJAZjyouI33Sk= Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-539-ZyBkxAxiPJeZpmz49AzC6Q-1; Mon, 19 Aug 2024 12:53:18 -0400 X-MC-Unique: ZyBkxAxiPJeZpmz49AzC6Q-1 Received: by mail-oo1-f71.google.com with SMTP id 006d021491bc7-5da952690beso632753eaf.1 for ; Mon, 19 Aug 2024 09:53:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724086397; x=1724691197; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RIGjmIxgd4ZYoEGhHZhEaO790wvl9zuuKnu8/dcY7mY=; b=qh3vDGFSC6/a4rne6h1RzA0BXE1QRXMObbadd/lsodRrdsDn9/848JFmB59H+1VSmt bOpbnIGyYHj15iKyup8o9EBGO7oOa78+fgKkQWBgn4s5oKex9dzOxdV9Nv2njk/LuztA snL5Z4fcPqVdjlo183oXD0nLnNTpYyhVBkWBwx/J3IWHADJL+u/z4XbehE77KlXqR93/ FYO5uUBGk61weM80MOSVh8gY2xZr2WtgteKYd05YfEPcyU3bfCcdvrPoBguyPK27BNIR W7YOvvmusjE0TXotknhwDJn3xPa7e//8mYaFPS0hon/KyaF5L8q69tvFV0kRZwgDZcgQ h0gA== X-Forwarded-Encrypted: i=1; AJvYcCWn2iWdViPxQ7BX8yeV8WJKb+uo/fmhZ3gWCzYgHAwKjpUORlVEDvDwhl3Apz0SEhNg7xkln+RJzJAP@vger.kernel.org X-Gm-Message-State: AOJu0Yw2ZUT0p5Ai6l6XQ2T8KtA8bgPhKIQd1zzjqUUYRCUb54Hlkk8q CXLE+fC6JcUIfKE+di/vRrkiOjb4ejPl7xvMdu8G09B82t/yblXD0bNGj/hRgVsgOUMpOC967kB tEag3u34x2ghFHzqo3HkZGPXbsxz3//yVsny5KdFjofBcpWYAqH8oWmnQtvo= X-Received: by 2002:a05:6358:6f15:b0:1ac:a26c:a617 with SMTP id e5c5f4694b2df-1b3933a2ef4mr724902255d.5.1724086397474; Mon, 19 Aug 2024 09:53:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGT/mWFQ9yoQUfbebPKob1DsZxH+iTK/HwcCt5JWpV0k06WRkWCd30wgdmfipghSMnyk6p9TQ== X-Received: by 2002:a05:6358:6f15:b0:1ac:a26c:a617 with SMTP id e5c5f4694b2df-1b3933a2ef4mr724898255d.5.1724086397091; Mon, 19 Aug 2024 09:53:17 -0700 (PDT) Received: from eisenberg.muc.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a4ff01e293sm446579885a.26.2024.08.19.09.53.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2024 09:53:16 -0700 (PDT) From: Philipp Stanner To: onathan Corbet , Jens Axboe , Wu Hao , Tom Rix , Moritz Fischer , Xu Yilun , Andy Shevchenko , Linus Walleij , Bartosz Golaszewski , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Bjorn Helgaas , Alvaro Karsz , "Michael S. Tsirkin" , Jason Wang , Xuan Zhuo , =?utf-8?q?Eugenio_P=C3=A9rez?= , Richard Cochran , Mark Brown , David Lechner , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , Jonathan Cameron , Philipp Stanner , Hannes Reinecke , Damien Le Moal , Chaitanya Kulkarni , "Martin K. Petersen" Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fpga@vger.kernel.org, linux-gpio@vger.kernel.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org, virtualization@lists.linux.dev Subject: [PATCH 9/9] PCI: Remove pcim_iounmap_regions() Date: Mon, 19 Aug 2024 18:51:49 +0200 Message-ID: <20240819165148.58201-11-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240819165148.58201-2-pstanner@redhat.com> References: <20240819165148.58201-2-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-fpga@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 All users of pcim_iounmap_regions() have been removed by now. Remove pcim_iounmap_regions(). Signed-off-by: Philipp Stanner Reviewed-by: Andy Shevchenko Reviewed-by: Damien Le Moal --- .../driver-api/driver-model/devres.rst | 1 - drivers/pci/devres.c | 21 ------------------- include/linux/pci.h | 1 - 3 files changed, 23 deletions(-) diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentation/driver-api/driver-model/devres.rst index ac9ee7441887..525f08694984 100644 --- a/Documentation/driver-api/driver-model/devres.rst +++ b/Documentation/driver-api/driver-model/devres.rst @@ -397,7 +397,6 @@ PCI pcim_iomap_regions_request_all() : do request_region() on all and iomap() on multiple BARs pcim_iomap_table() : array of mapped addresses indexed by BAR pcim_iounmap() : do iounmap() on a single BAR - pcim_iounmap_regions() : do iounmap() and release_region() on multiple BARs pcim_pin_device() : keep PCI device enabled after release pcim_set_mwi() : enable Memory-Write-Invalidate PCI transaction diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index 30c813766e8b..a1689100a535 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -1014,27 +1014,6 @@ int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask, } EXPORT_SYMBOL(pcim_iomap_regions_request_all); -/** - * pcim_iounmap_regions - Unmap and release PCI BARs - * @pdev: PCI device to map IO resources for - * @mask: Mask of BARs to unmap and release - * - * Unmap and release regions specified by @mask. - */ -void pcim_iounmap_regions(struct pci_dev *pdev, int mask) -{ - int i; - - for (i = 0; i < PCI_STD_NUM_BARS; i++) { - if (!mask_contains_bar(mask, i)) - continue; - - pcim_iounmap_region(pdev, i); - pcim_remove_bar_from_legacy_table(pdev, i); - } -} -EXPORT_SYMBOL(pcim_iounmap_regions); - /** * pcim_iomap_range - Create a ranged __iomap mapping within a PCI BAR * @pdev: PCI device to map IO resources for diff --git a/include/linux/pci.h b/include/linux/pci.h index 7de75900854a..4eee09624932 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2302,7 +2302,6 @@ void pcim_iounmap_region(struct pci_dev *pdev, int bar); int pcim_iomap_regions(struct pci_dev *pdev, int mask, const char *name); int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask, const char *name); -void pcim_iounmap_regions(struct pci_dev *pdev, int mask); void __iomem *pcim_iomap_range(struct pci_dev *pdev, int bar, unsigned long offset, unsigned long len);