Re: [PATCH 1/2] add phys_addr_t for holding physical addresses

From: Jeremy Fitzhardinge
Date: Mon Aug 11 2008 - 18:15:40 EST


Benjamin Herrenschmidt wrote:
On Mon, 2008-08-11 at 12:38 -0700, Jeremy Fitzhardinge wrote:
Add a kernel-wide "phys_addr_t" which is guaranteed to be able to hold
any physical address. By default it equals the word size of the
architecture, but a 32-bit architecture can set ARCH_PHYS_ADDR_T_64BIT
if it needs a 64-bit phys_addr_t.

I've been wondering for some time why can't we make phys_addr_t and
resource_size_t the same thing... I don't like having two ARCH_* thing
especially since I believe the one for resources is already what we
want.

I made the same argument, but Andrew thinks they're conceptually distinct. It is theoretically possible you might have a system with >4G memory, but all io resources < 4G, so you'd have resource_size_t 32-bits, while having 64-bit physical addresses. You can configure such a thing, but I don't know if it's 1) useful or 2) used.

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