Re: [PATCH] fix ppc ioremap prototype

From: Linus Torvalds
Date: Thu Sep 04 2003 - 12:27:22 EST



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

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