Re: [PATCH] x86: simplify mtrr_bp_init()

From: H. Peter Anvin
Date: Wed Jul 25 2012 - 12:57:23 EST


On 07/25/2012 12:59 AM, Jan Beulich wrote:

should drop all phys_addr assignment in this function.

x86_phys_bits should have all correct value?

Is it certain that all special cases (setting phys_addr to 32) are
covered by those CPUs not having PAE/PSE36? One would
think that this is valid to imply, but getting cpu_info's phys_bits
wrong isn't fatal as long as no addresses beyond 4G would ever
be encountered anywhere, whereas using too large an address
width here would result in the MTRR writes causing #GP. So
when I did this adjustment (a couple of years ago already - this
isn't the first submission), I decided to remain on the safe side.

Does any of the maintainers have an opinion either way?


There are definitely CPUs which have PAE but only has a 32-bit address bus. On the other hand there are tons of chipsets which arbitrary address caps that almost nothing in the system knows about, so I don't think this matters.

-hpa

--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

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