public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Regather scattered PCI-Code
@ 2023-11-20 21:59 Philipp Stanner
  2023-11-20 21:59 ` [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/ Philipp Stanner
                   ` (3 more replies)
  0 siblings, 4 replies; 37+ messages in thread
From: Philipp Stanner @ 2023-11-20 21:59 UTC (permalink / raw)
  To: Bjorn Helgaas, Arnd Bergmann, Andrew Morton, Randy Dunlap,
	Jason Gunthorpe, Eric Auger, Kent Overstreet, Niklas Schnelle,
	NeilBrown, Philipp Stanner, John Sanpe, Dave Jiang, Yury Norov,
	Kees Cook, Masami Hiramatsu (Google), David Gow, Herbert Xu,
	Thomas Gleixner, wuqiang.matt, Jason Baron, Ben Dooks,
	Danilo Krummrich
  Cc: linux-kernel, linux-pci

Hi!

So it seems that since ca. 2007 the PCI code has been scattered a bit.
PCI's devres code, which is only ever used by users of the entire
PCI-subsystem anyways, resides in lib/devres.c and is guarded by an
#ifdef PCI, just as the content of lib/pci_iomap.c is.

It, thus, seems reasonable to move all of that.

As I were at it, I moved as much of the devres-specific code from pci.c
to devres.c, too. The only exceptions are four functions that are
currently difficult to move. More information about that can be read
here [1].

I noticed these scattered files while working on (new) PCI-specific
devres functions. If we can get this here merged, I'll soon send another
patch series that addresses some API-inconsistencies and could move the
devres-part of the four remaining functions.

I don't want to do that in this series as this here is only about moving
code, whereas the next series would have to actually change API
behavior.

I successfully (cross-)built this for x86, x86_64, AARCH64 and ARM
(allyesconfig). I booted a kernel with it on x86_64, with a Fedora
desktop environment as payload. The OS came up fine

I hope this is OK. If we can get it in, we'd soon have a very
consistent PCI API again.

Regards,
P.

[1] https://lore.kernel.org/all/84be1049e41283cf8a110267646320af9ffe59fe.camel@redhat.com/


Philipp Stanner (4):
  lib: move pci_iomap.c to drivers/pci/
  lib: move pci-specific devres code to drivers/pci/
  pci: move devres code from pci.c to devres.c
  lib/iomap.c: improve comment about pci anomaly

 drivers/pci/Kconfig                    |   3 +
 drivers/pci/Makefile                   |   3 +-
 drivers/pci/devres.c                   | 449 +++++++++++++++++++++++++
 lib/pci_iomap.c => drivers/pci/iomap.c |   3 -
 drivers/pci/pci.c                      | 249 --------------
 drivers/pci/pci.h                      |  24 ++
 lib/Kconfig                            |   3 -
 lib/Makefile                           |   1 -
 lib/devres.c                           | 208 +-----------
 lib/iomap.c                            |  13 +-
 10 files changed, 490 insertions(+), 466 deletions(-)
 create mode 100644 drivers/pci/devres.c
 rename lib/pci_iomap.c => drivers/pci/iomap.c (99%)

-- 
2.41.0


^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2023-11-29 17:38 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-20 21:59 [PATCH 0/4] Regather scattered PCI-Code Philipp Stanner
2023-11-20 21:59 ` [PATCH 1/4] lib: move pci_iomap.c to drivers/pci/ Philipp Stanner
2023-11-21  4:20   ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox