Re: [PATCH] fix ppc ioremap prototype

Paul Mackerras
2003-09-04T09:23:00Z

Russell King writes:

> But phys_addr_t in struct resource and being passed into ioremap is
> confusing. Apparantly, it isn't a physical address, but a platform
> defined cookie which just happens to look like a physical address.

It happens to be a physical address on PPC. So I don't see why so
much fuss is being made over the PPC declaration of ioremap using
phys_addr_t for it. Other architectures might well do something
different.

> (or are we finally going to admit that it is a physical address?)

Well, it has to be globally unique across all resources of all devices
in the system. If you can have multiple PCI domains, that means you
can't just use the PCI bus address, for instance. And it is
preferably something that you can easily translate into a physical
address.

What I would prefer is if we passed a struct device pointer, a
resource pointer and an offset to ioremap. Then we could just have
bus addresses in PCI device resources instead of having to translate
them into physical addresses.

Paul.