Re: MMIO space (was Re: New kernel/resource.c)

Roger Gammans (rgammans@computer-surgery.co.uk)
Tue, 3 Aug 1999 21:28:08 +0100


In article <Pine.LNX.4.10.9908031544290.14675-100000@havoc.gtf.org>,
Jeff Garzik <garzik@pobox.com> writes
>On Tue, 3 Aug 1999, Roger Gammans wrote:
>> The way round it I keep thinking of is to have generic scheme like
>>
>> {read,write}{b,w,l}_resource(resource * res.int offset,
>> {byte,word,long} *data);
>
>That seems incredibly cumbersome.

Yes, I did say it had problems...

>All of those physical bus addresses are remapped using ioremap,
>so the arch writel() should do the right thing, given the right address...

But there are some truly evil hw schemes out there, and it could get
worse.

This decoupling allows transparent access to buses/resources which are
paged/addressed in very small lumps (sometimes just address/data
registers) into the CPUs visible address region, at the expense of
speed.

Normally I would leave this in the specific drivers, but I seem to be
hearing more about these sort of things, and wonder whether a generic
interface so the drivers can be easily layered makes sense.

It is cumbersome, it is in many ways ugly as I said, but it depends on
what you are trying to do - the importance of the layering property is a
point to consider, however I merely mentioned it in case someone
elsewhere saw merit in it.

TTFN

-- 
Roger Gammans
"If I have trouble installing Linux, something is wrong. Very wrong."
                -- Linus Torvalds

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/