linux-arch.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Further cleanups for pci_iounmap() and lib/iomap.c discussion
@ 2023-12-13 12:59 Philipp Stanner
  0 siblings, 0 replies; only message in thread
From: Philipp Stanner @ 2023-12-13 12:59 UTC (permalink / raw)
  To: Bjorn Helgaas, Arnd Bergmann, Johannes Berg, Randy Dunlap,
	NeilBrown, John Sanpe, Kent Overstreet, Niklas Schnelle,
	Philipp Stanner, Dave Jiang, Uladzislau Koshchanka,
	Masami Hiramatsu (Google), David Gow, Kees Cook, Rae Moar,
	Geert Uytterhoeven, wuqiang.matt, Yury Norov, Jason Baron,
	Thomas Gleixner, Marco Elver, Andrew Morton, Ben Dooks, dakr
  Cc: linux-kernel, linux-pci, linux-arch, stable

Hola,

This is a discussion about whether we want to move lib/iomap.c and
remove the remaining pci_io(un)map() definition of s390.

That would be followup work on our pci_iounmap() cleanup [1] that was
discussed here [2] (but is not yet merged).


The summary from the last discussions was:
 * GENERIC_IOMAP is not generic anymore, but x86-specific
 * All (?) archs should be able to use generic pci_iounmap()


I've been looking into GENERIC_IOMAP a bit and am unsure whether that's
true. Notably, powerpc seems to do something with it; see
platforms/Kconfig:

config PPC_INDIRECT_PIO
bool
select GENERIC_IOMAP


I've had a few ideas, but don't really want to pursue them until we had
a discussion about it:
   1. If GENERIC_IOMAP is really x86-specific, that should mean that we
      could move lib/iomap.c to x86 completely, since that file is only
      built when that symbol is defined.
   2. If it's moved to x86, the question arises whether it's possible
      to provide exact variants for lib/iomap.c's PIO_* constants. The
      comment above them in that file hint at those being just rough
      estimates ("assuming that all the low addresses are always PIO").
   3. To really just have one pci_iounmap(), we'd have to jump into
      s390 and replace its pci_iounmap(), which might be a bad idea
      since it also has its own pci_iomap().


So my tendency would be to leave s390 alone, figure out what's going on
with powerpc and then, if possible, move lib/iomap.c to x86 and
consequently have the second "generic" definition of iomem_is_ioport()
from asm-generic/iomap.h removed.

Ideas?

P.


[1] https://lore.kernel.org/all/20231213104922.13894-1-pstanner@redhat.com/
[2] https://lore.kernel.org/all/619ea619-29e4-42fb-9b27-1d1a32e0ee66@app.fastmail.com/


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-13 13:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-13 12:59 Further cleanups for pci_iounmap() and lib/iomap.c discussion Philipp Stanner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).