Anyway, one thing I mentioned earlier was that we could solve theRight, that was part of the goal here.
problem of drivers accessing unmapped IO ports and crashing systems on
archs which define PCI_IOBASE by building them under some "native port
IO support" flag.
One example of such a driver was F71805F sensor. You put that underGood point. It seems that I actually never added the LEGACY_PCI option
HAS_IOPORT, which would be available for all archs, I think. But I could
not see where config LEGACY_PCI is introduced. Could we further refine
that config to not build for such archs as arm64?
BTW, I think that the PPC dependency was added there to stop building
for power for that same reason, so hopefully we get rid of that.
to my patch,
so I'm just not building those drivers any more, and not
defining the inb()/outb() helpers either, causing a build failure when I'm
missing an option.
However it sounds like you are interested in a third option here, which
brings us to:
LEGACY_PCI: any PCI driver that uses inb()/outb() or is only available
on old-style PCI but not PCIe hardware without a bridge.
To be disabled for most architectures and possibly distros but can
be enabled for kernels that want to use those devices, as long as
CONFIG_HAS_IOPORT is set by the architecture.
HAS_IOPORT: not a legacy PCI device, but can only be built on
architectures that define inb()/outb(). To be disabled for s390
and any other machine that has no useful definition of those
functions.
HARDCODED_IOPORT: (or another name you might think of,) Used by
drivers that unconditionally do inb()/outb() without checking the
validity of the address using firmware or other methods first.
depends on HAS_IOPORT and possibly architecture specific
settings.