From patchwork Wed Aug 21 07:18:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13770950 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 85672C52D7C for ; Wed, 21 Aug 2024 07:26:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-ID:Date :Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=stErXlsn4bG59ZiuP1S49NzWKfcbkIn79Ht3IKYskFI=; b=KQMDPXvzj/Dxa4dbBYhqzVyUf7 x1mRSLRDc+kFGbxXCS+P022e1eHr9QHiCFRcW5CceFFYHG5UjbGv0cPyvHOVtuh4bvIFaORpQeYDV Ko12VWoAaB3Y2WqtOvyctcurW0EBrm58segDXBycPVB8G4UtkZCYkBfV+XXpVjvLqHNOkkhUw0woa oI6bNrl/xYvsTedYuUO2TzQpber0jHa55HSSoHgTJ4TgKXw92HzAXc13Z/hsvgwLw21qF5/LLl3kF pweXVKYfk0VBi2f3BxgO5BusmRmzm/XPG9mQCUOaehD6dURR9Suwfja9U0OQvOCvx3p0dN5BR+7uc 9fbEuFbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgfjQ-00000007u5m-1Qdc; Wed, 21 Aug 2024 07:26:12 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sgfdH-00000007rsi-2hMw for linux-arm-kernel@lists.infradead.org; Wed, 21 Aug 2024 07:19:53 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724224790; h=from:from: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=stErXlsn4bG59ZiuP1S49NzWKfcbkIn79Ht3IKYskFI=; b=RUtucuTc0hx/AuJlVpgZdosvNsjA3Ow3sNuErAtHFqw4FwTDxmomIx2Gs5NBZysyXWcQ/H 1dBbwWDy+rBg8xtYj0H6u/vWb6r9KOPtvzXnnWkpV3CC8XCpWmRJ5sKfM5Hhjb4HroHhH6 vgenlTPWkjEK+NRAACHDYWWkO4D9g2s= Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-675-p4pfaAF2N2elh9AbEaYRUw-1; Wed, 21 Aug 2024 03:19:48 -0400 X-MC-Unique: p4pfaAF2N2elh9AbEaYRUw-1 Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7a1d44099a3so699481585a.3 for ; Wed, 21 Aug 2024 00:19:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724224788; x=1724829588; 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=stErXlsn4bG59ZiuP1S49NzWKfcbkIn79Ht3IKYskFI=; b=WLTh6bEKwVUa6SWj2dNgZ5r+3d83cHTyMyalExm8Bw+jkaObwi7OoztGZ4wnz1Puqd 6qpFodW4N0XyorCqNpKHpcqUggPQXBP9yENWmyWzWyhsmAmjtn9a+PQp6cuz9icvx7Yq hRBs1naoVTbttz2YaRs6InoCK23y4yof24U5Vro5IoWCPJ48iOl03MvgzySQZiBUOH9Z iVLcut476ZhRc0SJ6Ejxi/QMDh0oV2o4kEOPJ8Yd/SGbKRqhTmnVVnBEKCBxrD03b3BE VL2zhF6Btq4mJaBCltLyHtli3kY+eD63HZ7hkk7PRZ+bEo0PavT1hfyC37hG4dnlXiCm MDcg== X-Forwarded-Encrypted: i=1; AJvYcCWH1uWvL6B9oo4/77v1MQJZfZr8nZMoD/4vaN/gj+xOSnqlMamngxtTLYQY1h24OBCwdhLpNAS/Hs4wPCqYoESe@lists.infradead.org X-Gm-Message-State: AOJu0YwqaxEfmLoMt6EVVmFdSSp25WD7lmEGC1ooCup3wb7QNgfzdGAk HJjAzXNXMI83+nYi7LlT1JGMTNMfwjlHachNZ+zoOz3AuFEyqAs+aNRPvgWYQOqLSLpp362PqK1 WPFC+fer34nEsWx/DAv9qNMWQXV/N3GhcUgOcnn09XaHGTkmbhalgz+ObeoKcdKCzMPhpaOMz X-Received: by 2002:a05:620a:17a1:b0:7a1:ccfb:faf with SMTP id af79cd13be357-7a674048908mr211360285a.38.1724224788354; Wed, 21 Aug 2024 00:19:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEUvUNVPoVPY0IqYI+9FyKN/j3iG1JNGhE8e2W6Pqxb+HWSkXXSyWApzCMJK3GHPcsNkvlKfQ== X-Received: by 2002:a05:620a:17a1:b0:7a1:ccfb:faf with SMTP id af79cd13be357-7a674048908mr211356885a.38.1724224787793; Wed, 21 Aug 2024 00:19:47 -0700 (PDT) Received: from eisenberg.redhat.com (nat-pool-muc-t.redhat.com. [149.14.88.26]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7a4ff013ef2sm596207885a.11.2024.08.21.00.19.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Aug 2024 00:19:46 -0700 (PDT) From: Philipp Stanner To: Jonathan 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?= , Philipp Stanner , Damien Le Moal , Hannes Reinecke , Keith Busch 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 v2 9/9] PCI: Remove pcim_iounmap_regions() Date: Wed, 21 Aug 2024 09:18:42 +0200 Message-ID: <20240821071842.8591-11-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240821071842.8591-2-pstanner@redhat.com> References: <20240821071842.8591-2-pstanner@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240821_001951_780789_11F4A883 X-CRM114-Status: GOOD ( 13.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 4dbba385e6b4..022c0bb243ad 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -1013,27 +1013,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 9625d8a7b655..6c60f063c672 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2301,7 +2301,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);