From patchwork Thu Aug 22 13:47:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Stanner X-Patchwork-Id: 13773471 X-Patchwork-Delegate: bhelgaas@google.com 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 66D3F1CE70E for ; Thu, 22 Aug 2024 13:48: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=1724334502; cv=none; b=nQjYkAE9EnTiELME3p+C0TNcQHM+MSaQXRMnBnBcMNaV0qAZo0YgKt8u0VPTi66efIyvEqPFt34P+XMj5iMeEJIjE66eie6vlKyBOhloH+TXVpgkK0zh5OroIyK79Y3A/nN0GN+eesvuWDW1QM0GXYgMJnearmIECSxLlahUFAo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724334502; c=relaxed/simple; bh=xzKTSbBUCxwnUpKs8six5ekb8eTkm5n7sI9qBsfTSxA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KldPq9zbDRyWwORMCduVCKhO+FU4/nkZ+xvdI/oF0lU4nA59527J/OpYFe2MNRnWqz4pPTK/dgPXsZByI5k2nAT6ajsyJFMXx3MR9OUKG4xEZk/ZycOqCjAmPfOKsnOvoJZr8+Y2wYiI6jsQC/ESZ8iWnabzyLWW6sy31SgRgnU= 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=bFurobo9; 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="bFurobo9" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724334499; 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=stErXlsn4bG59ZiuP1S49NzWKfcbkIn79Ht3IKYskFI=; b=bFurobo95VLUhde3hU0XrfTQcWPgVy4Fuienjxdq5HfFRdd65WzUaThBk91w9hF/28044T Ei+PoMAbTyT/KfrtOewmtxYJJVayw7qeUxqd2IzXIMKjjGbRutViUxhfzmvNmyYj2+nYlx Fcv4ZcwZoutZDtcm+dCJFe284Q9obzc= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-323-hTV_oEczPii8Fno0oq2NLw-1; Thu, 22 Aug 2024 09:48:15 -0400 X-MC-Unique: hTV_oEczPii8Fno0oq2NLw-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-4280ec5200cso6293345e9.0 for ; Thu, 22 Aug 2024 06:48:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724334494; x=1724939294; 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=ET3N9UG8IVUQaoYK23x7DUQC2rL0HhE+LGn7cozTtddvUfAgzfm8LNMHmNtw+e79ki B4pbLRVtWMzJOUReMSligNgCn2vKgYPjKnxeXvwXsuyvoislVijF3JG3oh4W4BHE5hLO ouAQ7t3xKGDdZq3C05wW6N4HEqLkR+rC81LmR/5HPFsDsKWwXnL0cTCgM8kuGDjgF1y+ NkAZ1MnHc2+33kdfhTtgufDN9lHJ37YWIAq8NkjqCNvFK9EPWP1EZ+UFTPmQ/Nhb66QR UjSC3/Wga86nm6pnVn1UpcwnuckW2Nu7oBSjQ6U0IL62l6pOOAJgIPUgOiZNGE5O050f Q1PA== X-Forwarded-Encrypted: i=1; AJvYcCVx0cT5sDBjYRrW5193yFJZil11ULL3KeVXSxQpDtLnm68EENCw2xFOj8O8As2Dx61Js/J75BG6xOc=@vger.kernel.org X-Gm-Message-State: AOJu0YxwzWOwrVmm2TEWPCsN6tdprwFUZ1eBApsMRCx+QtRR/kt5mhdF bQNhsfdz/Jb/3XoLgpZsh7imI2renhLPBzsHTAtSS8S/j/Rf5oWoXGBUuVZwQLCbEBVwsmsqhee yRxGcLBTfcBLY7v+Tv/dtjohplXCmnddzgJfMVxDOvU6nKnzyf9rRR+KIfA== X-Received: by 2002:a05:600c:470d:b0:426:5cee:4abc with SMTP id 5b1f17b1804b1-42abd23c42fmr42834475e9.20.1724334494014; Thu, 22 Aug 2024 06:48:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE+ml6suAX3eG1pz2LPHUrAJqRTfncLpMSUbPA+Ci3dUa++3KF20e/68btOdPMgiZkBffw5eg== X-Received: by 2002:a05:600c:470d:b0:426:5cee:4abc with SMTP id 5b1f17b1804b1-42abd23c42fmr42833985e9.20.1724334493539; Thu, 22 Aug 2024 06:48:13 -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 5b1f17b1804b1-42ac5162322sm25057215e9.24.2024.08.22.06.48.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Aug 2024 06:48:11 -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 , Chaitanya Kulkarni 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 v3 9/9] PCI: Remove pcim_iounmap_regions() Date: Thu, 22 Aug 2024 15:47:41 +0200 Message-ID: <20240822134744.44919-10-pstanner@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240822134744.44919-1-pstanner@redhat.com> References: <20240822134744.44919-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-pci@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 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);