Re: [PATCH 3/7] mtrr: Remove use_intel()

From: H. Peter Anvin
Date: Wed Dec 09 2009 - 14:05:08 EST


On 12/09/2009 10:32 AM, Yinghai Lu wrote:
> /*
> * Generic structure...
> */
> struct mtrr_ops generic_mtrr_ops = {
> .use_intel_if = 1,
> .set_all = generic_set_all,
>
> so all cpus that cpuid tell us that there is mtrr support, will all
> have use_intel() == 1

Yes, because the right thing to check isn't the CPU vendor bit but the
CPU feature bits -- all CPUs that have the MTRR feature bit are using
the "Intel interface" -- regardless of if they are made by Intel, AMD,
VIA, or Transmeta. The older AMD, Cyrix etc. interfaces use different bits.

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