Re: [RFC] I/O Access Abstractions

David Woodhouse
2001-07-02T16:18:39Z

dhowells@redhat.com said:
> I think the second #define should be:
> #define res_readb(res, adr) readb(res->start+adr)
> for consistency.

You're right that it should be consistent. But it doesn't really matter
whether we pass an offset within the resource, or whether we continue to
pass the full 'bus address'. The driver doesn't even need to care - it just
adds the register offset to whatever opaque cookie it's given as the address
of that resource anyway.

That's really an orthogonal issue. The _important_ bit is that we pass the
resource to the I/O functions, so that in the case where they're
out-of-line, they don't need to play silly buggers with the numbers they're
given just to work out which bus they should be talking to.

--
dwmw2