On Fri, Aug 17, 2018 at 6:20 PM Boris Brezillon
<[email protected]> wrote:
>
> On Fri, 17 Aug 2018 15:56:23 +0000
> "Luck, Tony" <[email protected]> wrote:
>
> > >> - Some targets don't have any support for I/O space on their PCI bus and 
> > >> just
> > >>    want to get things to compile by setting PCI_IOBASE to zero, this 
> > >> still opens
> > >>     up some of the same problems as above, but doesn't really help 
> > >> otherwise.
> >
> > That sounds horrible. Why would you want to have a driver that can't 
> > possibly
> > work on your platform compile cleanly? That's just asking for trouble. 
> > Sombody
> > might load that driver, and ... all the outb/outw/outl calls just corrupt 
> > low memory.
>
> Well, COMPILE_TEST is here just for that, and it's actually quite
> useful to detect potential compilation errors/warnings and make sure
> the driver is portable. So, either we decide that readsx/writesx() are
> not standard and we create a Kconfig option to reflect when an arch
> implements them so that drivers using those funcs can at least be
> compile-tested on a few archs, or we fix all archs that do not
> implement those functions.

What I meant is not specifically for compile testing, but for drivers
that are used and required on regular platforms and can be used with
either MMIO or PIO mode. serial_8250 is the typical example here,
but there are others as well.

       Arnd

Reply via email to