Re: [PATCH] fix ppc ioremap prototype

Linus Torvalds
2003-09-04T17:25:05Z

On Thu, 4 Sep 2003, Jeff Garzik wrote:
>
> Would still be nice to have a sysdata or struct device pointer in struct
> resource, then. I'm not a fan of wacky
> bus-info-encoded-in-another-number schemes.

But it _isn't_ "bus info".

It's a unique number. It has no bus information embedded in it. It's a
number that tells ioremap() what area to remap.

It's a "hardware dependent iomem address". What the address _means_ is
entirely up to the architecture, and depends on how devices are acccessed,
and what is most convenient to make them accessible (with the first level
of that access translation being done "statically" by ioremap(), and the
second level of the access translation being done by "read[bwl]()" and
friends).

You could make "ioremap()" be a no-op and do all translation dynamically.
Of you could make "ioremap()" be complex, and do no dynamic translation
(x86). Or you can have a combination of the two.

The numbers don't have "meaning" per se. The inputs to "ioremap()" are
"ranges of something". They are the exact same "somethings" as lives in
"iomem_resource" "resources of something".

Linus