From nobody Mon Nov 25 18:40:24 2024 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 3A34920D4EB for ; Fri, 25 Oct 2024 15:00:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868463; cv=none; b=AhNkwKEkTZPnlwCglEhiPJzZsioOvPU4S+bb2b6il5hGp1+T6XAnFEameaO6sku3T5v3++QsTZfLW+FJ3YM9LWaifOgySh+pPx+oKdVTY+ZM4Cgbyjr+Xnl7zNFCa4UaL46j/wxPghQWFUo4ZRt+hgAT/FQNdRLdkM7bTdje8Ns= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729868463; c=relaxed/simple; bh=RcTa7mPaWn9S/3FL+we6iyllf4n7RFykRGESqGJxd90=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Kc6gXEOrWEuNeuyNxjytdwrEA5Wkk57A7VXASLwEXHTSr1pwSF1lJEJFWADGeakAkpt9rl0iL6aRQJbudAGZFsByfCyEGdknHKn9XLzLvkeEKi2hhBseYqtaNH4NF2Y2Pr9ICQfpzCLdWu4yNMEicMDWFmsnQ5VxbbaTofaOM10= 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=RqUdISU3; arc=none smtp.client-ip=170.10.133.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="RqUdISU3" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729868457; 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=AonUKd9JFeAmu2FkelnO1Z47g8svJdBoVMsQtMVmtG0=; b=RqUdISU3do1pwaj63hjQtKPcrL6jcHZeCaC4wm3F3kGaXAwiN3Df5LO2+iytCU4VwhHNgn TInL0oeff8Memm3fSb5NHsJsSXk30ch/NjEEDAbxiWgCe3YM81LuMX1Yeh4niBGmvuVZKS l40MOzQn/dIliY8pUG0A2eKNv2PYZyk= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-116-YYuo7jAGMTudqvqXEYZwFg-1; Fri, 25 Oct 2024 11:00:56 -0400 X-MC-Unique: YYuo7jAGMTudqvqXEYZwFg-1 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-37d4922d8c7so1209621f8f.1 for ; Fri, 25 Oct 2024 08:00:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729868455; x=1730473255; 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=AonUKd9JFeAmu2FkelnO1Z47g8svJdBoVMsQtMVmtG0=; b=QCy0yIvduM42GTkcSCbvXqLhteJ3ijnJ8uCu0dRyH/gq5dm1wXDFGrXbwyt3BRGfC5 PjFRmCiwhbtsN554cpfS3oYlJRkp8VM33Y9awu5qaYOzsk+W/VjCr9/bH+asduQnbtOQ 4tBwJqIoJUQbt+vXqKc56owsD3NAfWkQIsXgiyAS/ChYCbAJGdzNOV6zUvrOyGj8XLRU Wj+3AHraDdI1zNiXW/aV09AxibRJVHuPxiiN3isWODd5oXccFVCGQ5ugxfFiI0vuSNtd iyvGghaerqiuvUNgAMFaZvsqR0l6vXjKi2yKD52IledrA2qkvlrGHPylMH/MsLKQdydC +W2Q== X-Forwarded-Encrypted: i=1; AJvYcCXbIfNJe2fjme422B7E2Fj310Wh+2RrIQM4D04XwPOWBkItPyZQXk6x8Q7FsMCGa9RL/tDwEx48qq9cp+c=@vger.kernel.org X-Gm-Message-State: AOJu0YxeDYFNbhNDxbj0XsszNr994Covv8t2jD7WKCPD6wCWoywqgx3V 9VefFzwcq94D55bhdBWDPeCvVld88ZfezZx4AIotDKANYTQfv1syGfvz/jPX+1zVKd2uGgG2n1G E+fQTL8cq6WaJQbiAAZrdieaIVicpPo2tASyu5ecAE9hS5fOWhCOoi2DnTuzzOQ== X-Received: by 2002:a5d:434e:0:b0:37d:4d3f:51e9 with SMTP id ffacd0b85a97d-37efcf7665amr6749347f8f.40.1729868454497; Fri, 25 Oct 2024 08:00:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYS4KQfglA92Gzw16122qjYNkYIWyEgmDdpCu016/6uuxTInLXjVC7AfMuCfkKwlTQ2XYDlQ== X-Received: by 2002:a5d:434e:0:b0:37d:4d3f:51e9 with SMTP id ffacd0b85a97d-37efcf7665amr6749277f8f.40.1729868453962; Fri, 25 Oct 2024 08:00:53 -0700 (PDT) Received: from eisenberg.fritz.box (200116b82de5ba00738ac8dadaac7543.dip.versatel-1u1.de. [2001:16b8:2de5:ba00:738a:c8da:daac:7543]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b9216fsm1727189f8f.100.2024.10.25.08.00.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 08:00:53 -0700 (PDT) From: Philipp Stanner To: Jonathan Corbet , Damien Le Moal , Niklas Cassel , Giovanni Cabiddu , Herbert Xu , "David S. Miller" , Boris Brezillon , Arnaud Ebalard , Srujana Challa , Alexander Shishkin , Miri Korenblit , Kalle Valo , Serge Semin , Jon Mason , Dave Jiang , Allen Hubbe , Bjorn Helgaas , Kevin Cernekee , Greg Kroah-Hartman , Jiri Slaby , Jaroslav Kysela , Takashi Iwai , Mark Brown , David Lechner , Philipp Stanner , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jie Wang , Tero Kristo , Adam Guerin , Shashank Gupta , Przemek Kitszel , Bharat Bhushan , Nithin Dabilpuram , Johannes Berg , Emmanuel Grumbach , Gregory Greenman , Benjamin Berg , Yedidya Benshimol , Breno Leitao , Florian Fainelli , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, qat-linux@intel.com, linux-crypto@vger.kernel.org, linux-wireless@vger.kernel.org, ntb@lists.linux.dev, linux-pci@vger.kernel.org, linux-serial@vger.kernel.org, linux-sound@vger.kernel.org Subject: [PATCH 10/10] PCI: Remove pcim_iomap_regions_request_all() Date: Fri, 25 Oct 2024 16:59:53 +0200 Message-ID: <20241025145959.185373-11-pstanner@redhat.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241025145959.185373-1-pstanner@redhat.com> References: <20241025145959.185373-1-pstanner@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" pcim_iomap_regions_request_all() have been deprecated in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()"). All users of this function have been ported to other interfaces by now. Remove pcim_iomap_regions_request_all(). Signed-off-by: Philipp Stanner Reviewed-by: Damien Le Moal --- .../driver-api/driver-model/devres.rst | 1 - drivers/pci/devres.c | 56 ------------------- include/linux/pci.h | 2 - 3 files changed, 59 deletions(-) diff --git a/Documentation/driver-api/driver-model/devres.rst b/Documentati= on/driver-api/driver-model/devres.rst index 5f2ee8d717b1..3a30cf4f6c0d 100644 --- a/Documentation/driver-api/driver-model/devres.rst +++ b/Documentation/driver-api/driver-model/devres.rst @@ -394,7 +394,6 @@ PCI pcim_enable_device() : after success, some PCI ops become managed pcim_iomap() : do iomap() on a single BAR pcim_iomap_regions() : do request_region() and iomap() on multiple BARs - 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 B= ARs diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index 2a64da5c91fb..319a477a2135 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -959,62 +959,6 @@ int pcim_request_all_regions(struct pci_dev *pdev, con= st char *name) } EXPORT_SYMBOL(pcim_request_all_regions); =20 -/** - * pcim_iomap_regions_request_all - Request all BARs and iomap specified o= nes - * (DEPRECATED) - * @pdev: PCI device to map IO resources for - * @mask: Mask of BARs to iomap - * @name: Name associated with the requests - * - * Returns: 0 on success, negative error code on failure. - * - * Request all PCI BARs and iomap regions specified by @mask. - * - * To release these resources manually, call pcim_release_region() for the - * regions and pcim_iounmap() for the mappings. - * - * This function is DEPRECATED. Don't use it in new code. Instead, use one - * of the pcim_* region request functions in combination with a pcim_* - * mapping function. - */ -int pcim_iomap_regions_request_all(struct pci_dev *pdev, int mask, - const char *name) -{ - int bar; - int ret; - void __iomem **legacy_iomap_table; - - ret =3D pcim_request_all_regions(pdev, name); - if (ret !=3D 0) - return ret; - - for (bar =3D 0; bar < PCI_STD_NUM_BARS; bar++) { - if (!mask_contains_bar(mask, bar)) - continue; - if (!pcim_iomap(pdev, bar, 0)) - goto err; - } - - return 0; - -err: - /* - * If bar is larger than 0, then pcim_iomap() above has most likely - * failed because of -EINVAL. If it is equal 0, most likely the table - * couldn't be created, indicating -ENOMEM. - */ - ret =3D bar > 0 ? -EINVAL : -ENOMEM; - legacy_iomap_table =3D (void __iomem **)pcim_iomap_table(pdev); - - while (--bar >=3D 0) - pcim_iounmap(pdev, legacy_iomap_table[bar]); - - pcim_release_all_regions(pdev); - - return ret; -} -EXPORT_SYMBOL(pcim_iomap_regions_request_all); - /** * pcim_iounmap_regions - Unmap and release PCI BARs * @pdev: PCI device to map IO resources for diff --git a/include/linux/pci.h b/include/linux/pci.h index 3b151c8331e5..b59197635c5c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -2301,8 +2301,6 @@ void pcim_iounmap(struct pci_dev *pdev, void __iomem = *addr); void __iomem * const *pcim_iomap_table(struct pci_dev *pdev); int pcim_request_region(struct pci_dev *pdev, int bar, const char *name); 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); --=20 2.47.0