Re: [PATCH] fix ppc ioremap prototype

From: Paul Mackerras
Date: Thu Sep 04 2003 - 04:25:38 EST


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.

-
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/