Re: [PATCH] x86: x86_{phys,virt}_bits field also for i386 (v3)
From: H. Peter Anvin
Date: Thu Sep 18 2008 - 14:16:31 EST
Jeremy Fitzhardinge wrote:
Is x86_phys_bits defined to be the actual number of address lines poking
out of the CPU package, or the number of address bits we can
meaningfully put into a pte?
My opinion is that it should be the number of physical address bits
available on the hardware, not as limited by the kernel.
I would say the simplest thing to do here is be explicit:
if (sizeof(addr) == sizeof(u64))
return !(addr >> boot_cpu_data.x86_phys_bits);
else
return 1;
That's not ideal, but I guess its good enough. I assume x86_phys_bits
can never be less than 32?
Technically speaking the 386SX had 24 physical address bits. We do not
actually set it that way, and I'm not even sure how to detect the 386SX
programmatically.
-hpa
--
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/