_IO_IS_ISA question

Benjamin Herrenschmidt benh at kernel.crashing.org
Tue Mar 16 17:50:59 EST 2004


On Tue, 2004-03-16 at 09:35, Jake Moilanen wrote:
> In eeh.h, on all of our eeh_in/outb calls there is a check to see if the
> port is under 64k, and if it is we assume it's an ISA address.  Isn't it
> legal for a port to be under 64k and be in PCI space?

Yes. The "ISA" IO space is just a a subset of the PCI space. If this is
not the case, then the code is bogus.

> For instance:
>
> static inline u8 eeh_inb(unsigned long port) {
>         u8 val;
>         if (_IO_IS_ISA(port) && !_IO_HAS_ISA_BUS)
>                 return ~0;
>         val = in_8((u8 *)(port+pci_io_base));
>         if (!_IO_IS_ISA(port) && EEH_POSSIBLE_IO_ERROR(val, u8))
>                 return eeh_check_failure((void*)(port), val);
>         return val;
> }
>
> Why do we have:
>
> 	if (_IO_IS_ISA(port) && !_IO_HAS_ISA_BUS)
> 		return ~0;

It's a bug.

Ben.


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list