Re: [RFC] I/O Access Abstractions

David Woodhouse
2001-07-02T14:24:10Z

jes@sunsite.dk said:
> But it's going to cost for the ones who do not support this.

You don't need to make it out-of-line for all cases - or indeed in any case
where it isn't out-of-line already. Some architectures may have only IO
calls out-of-line (many already do). Some may have MMIO calls out-of-line
too - some already do that too.

It would just be nice to have a standard way of doing it, and in particular
it would be nice to pass the struct resource into the out-of-line functions
in the case where they _are_ out of line, so that the Iyou/O functions don't
have to play evil tricks with the numbers they're given to work out which bus
the caller wanted to talk to.

#ifdef OUT_OF_LINE_MMIO
#define res_readb(res, adr) (res->access_ops->readb(res, adr)
#else
#define res_readb(res, adr) readb(adr)
#endif

etc.

--
dwmw2