public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Philipp Stanner <pstanner@redhat.com>
To: Bjorn Helgaas <bhelgaas@google.com>,
	Arnd Bergmann <arnd@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Randy Dunlap <rdunlap@infradead.org>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	Eric Auger <eric.auger@redhat.com>,
	Kent Overstreet <kent.overstreet@gmail.com>,
	Niklas Schnelle <schnelle@linux.ibm.com>,
	NeilBrown <neilb@suse.de>, Philipp Stanner <pstanner@redhat.com>,
	John Sanpe <sanpeqf@gmail.com>, Dave Jiang <dave.jiang@intel.com>,
	Yury Norov <yury.norov@gmail.com>,
	Kees Cook <keescook@chromium.org>,
	"Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
	David Gow <davidgow@google.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	Thomas Gleixner <tglx@linutronix.de>,
	"wuqiang.matt" <wuqiang.matt@bytedance.com>,
	Jason Baron <jbaron@akamai.com>,
	Ben Dooks <ben.dooks@codethink.co.uk>,
	Danilo Krummrich <dakr@redhat.com>
Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org
Subject: [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/
Date: Mon, 20 Nov 2023 22:59:43 +0100	[thread overview]
Message-ID: <20231120215945.52027-3-pstanner@redhat.com> (raw)
In-Reply-To: <20231120215945.52027-2-pstanner@redhat.com>

This file is guarded by an #ifdef CONFIG_PCI. It, consequently, does not
belong to lib/ because it is not generic infrastructure.

Move the file to drivers/pci/ and implement the necessary changes to
Makefiles and Kconfigs.

Suggested-by: Danilo Krummrich <dakr@redhat.com>
Signed-off-by: Philipp Stanner <pstanner@redhat.com>
---
 drivers/pci/Kconfig                    | 3 +++
 drivers/pci/Makefile                   | 1 +
 lib/pci_iomap.c => drivers/pci/iomap.c | 3 ---
 lib/Kconfig                            | 3 ---
 lib/Makefile                           | 1 -
 5 files changed, 4 insertions(+), 7 deletions(-)
 rename lib/pci_iomap.c => drivers/pci/iomap.c (99%)

diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig
index 74147262625b..b54cacbc1160 100644
--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -34,6 +34,9 @@ config PCI_DOMAINS_GENERIC
 config PCI_SYSCALL
 	bool
 
+config GENERIC_PCI_IOMAP
+	bool
+
 source "drivers/pci/pcie/Kconfig"
 
 config PCI_MSI
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile
index cc8b4e01e29d..d6d0abfe59e2 100644
--- a/drivers/pci/Makefile
+++ b/drivers/pci/Makefile
@@ -33,6 +33,7 @@ obj-$(CONFIG_XEN_PCIDEV_FRONTEND) += xen-pcifront.o
 obj-$(CONFIG_VGA_ARB)		+= vgaarb.o
 obj-$(CONFIG_PCI_DOE)		+= doe.o
 obj-$(CONFIG_PCI_DYNAMIC_OF_NODES) += of_property.o
+obj-$(CONFIG_GENERIC_PCI_IOMAP) += iomap.o
 
 # Endpoint library must be initialized before its users
 obj-$(CONFIG_PCI_ENDPOINT)	+= endpoint/
diff --git a/lib/pci_iomap.c b/drivers/pci/iomap.c
similarity index 99%
rename from lib/pci_iomap.c
rename to drivers/pci/iomap.c
index ce39ce9f3526..0a9d503ba533 100644
--- a/lib/pci_iomap.c
+++ b/drivers/pci/iomap.c
@@ -9,7 +9,6 @@
 
 #include <linux/export.h>
 
-#ifdef CONFIG_PCI
 /**
  * pci_iomap_range - create a virtual mapping cookie for a PCI BAR
  * @dev: PCI device that owns the BAR
@@ -176,5 +175,3 @@ void pci_iounmap(struct pci_dev *dev, void __iomem *p)
 EXPORT_SYMBOL(pci_iounmap);
 
 #endif /* ARCH_WANTS_GENERIC_PCI_IOUNMAP */
-
-#endif /* CONFIG_PCI */
diff --git a/lib/Kconfig b/lib/Kconfig
index 3ea1c830efab..1bf859166ac7 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -70,9 +70,6 @@ source "lib/math/Kconfig"
 config NO_GENERIC_PCI_IOPORT_MAP
 	bool
 
-config GENERIC_PCI_IOMAP
-	bool
-
 config GENERIC_IOMAP
 	bool
 	select GENERIC_PCI_IOMAP
diff --git a/lib/Makefile b/lib/Makefile
index 6b09731d8e61..0800289ec6c5 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -153,7 +153,6 @@ CFLAGS_debug_info.o += $(call cc-option, -femit-struct-debug-detailed=any)
 obj-y += math/ crypto/
 
 obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
-obj-$(CONFIG_GENERIC_PCI_IOMAP) += pci_iomap.o
 obj-$(CONFIG_HAS_IOMEM) += iomap_copy.o devres.o
 obj-$(CONFIG_CHECK_SIGNATURE) += check_signature.o
 obj-$(CONFIG_DEBUG_LOCKING_API_SELFTESTS) += locking-selftest.o
-- 
2.41.0


  reply	other threads:[~2023-11-20 22:00 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20 21:59 [PATCH 0/4] Regather scattered PCI-Code Philipp Stanner
2023-11-20 21:59 ` Philipp Stanner [this message]
2023-11-21  4:20   ` [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/ kernel test robot
2023-11-21 10:44     ` Philipp Stanner
2023-11-21  6:48   ` kernel test robot
2023-11-21  7:22     ` Arnd Bergmann
2023-11-21  7:20   ` kernel test robot
2023-11-21  7:45   ` kernel test robot
2023-11-21  7:58   ` kernel test robot
2023-11-21  8:46   ` kernel test robot
2023-11-21 10:44   ` kernel test robot
2023-11-21 10:44   ` kernel test robot
2023-11-21 13:14   ` kernel test robot
2023-11-21 14:38   ` kernel test robot
2023-11-21 15:04   ` kernel test robot
2023-11-21 15:40   ` kernel test robot
2023-11-21 15:56   ` kernel test robot
2023-11-22  1:51     ` Liu, Yujie
2023-11-22  8:15       ` Philipp Stanner
2023-11-23  6:42         ` Yujie Liu
2023-11-22 16:28   ` kernel test robot
2023-11-20 21:59 ` [PATCH 2/4] lib: move pci-specific devres code " Philipp Stanner
2023-11-21  7:29   ` Arnd Bergmann
2023-11-21  8:00     ` Philipp Stanner
2023-11-21 10:10       ` Arnd Bergmann
2023-11-20 21:59 ` [PATCH 3/4] pci: move devres code from pci.c to devres.c Philipp Stanner
2023-11-21 10:17   ` Arnd Bergmann
2023-11-21 10:36     ` Philipp Stanner
2023-11-20 21:59 ` [PATCH 4/4] lib/iomap.c: improve comment about pci anomaly Philipp Stanner
2023-11-21 10:03   ` Arnd Bergmann
2023-11-21 14:38     ` Philipp Stanner
2023-11-21 14:41       ` Arnd Bergmann
2023-11-24 19:08     ` Danilo Krummrich
2023-11-29 10:16       ` Philipp Stanner
2023-11-29 17:37         ` Arnd Bergmann
2023-11-29 12:40     ` Philipp Stanner
2023-11-29 16:52       ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231120215945.52027-3-pstanner@redhat.com \
    --to=pstanner@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@kernel.org \
    --cc=ben.dooks@codethink.co.uk \
    --cc=bhelgaas@google.com \
    --cc=dakr@redhat.com \
    --cc=dave.jiang@intel.com \
    --cc=davidgow@google.com \
    --cc=eric.auger@redhat.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=jbaron@akamai.com \
    --cc=jgg@ziepe.ca \
    --cc=keescook@chromium.org \
    --cc=kent.overstreet@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=neilb@suse.de \
    --cc=rdunlap@infradead.org \
    --cc=sanpeqf@gmail.com \
    --cc=schnelle@linux.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=wuqiang.matt@bytedance.com \
    --cc=yury.norov@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox