x86/mtrr: Resolve inconsistency with Intel processor manual
authorAjaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Fri, 11 Nov 2011 13:01:57 +0000 (18:31 +0530)
committerIngo Molnar <mingo@elte.hu>
Mon, 5 Dec 2011 14:06:15 +0000 (15:06 +0100)
commit8dbf4a30033ff61091015f0076e872b5c8f717cc
treeeec2f316bd8b8b134fd9e830605cd809cf878707
parent644ddf588f5dba34df483a6ea8abe639cc102289
x86/mtrr: Resolve inconsistency with Intel processor manual

Following is from Notes of section 11.5.3 of Intel processor
manual available at:

  http://www.intel.com/Assets/PDF/manual/325384.pdf

For the Pentium 4 and Intel Xeon processors, after the sequence of
steps given above has been executed, the cache lines containing the
code between the end of the WBINVD instruction and before the
MTRRS have actually been disabled may be retained in the cache
hierarchy. Here, to remove code from the cache completely, a
second WBINVD instruction must be executed after the MTRRs have
been disabled.

This patch provides resolution for that.

Ideally, I will like to make changes only for Pentium 4 and Xeon
processors. But, I am not finding easier way to do it.
And, extra wbinvd() instruction does not hurt much for other
processors.

Signed-off-by: Ajaykumar Hotchandani <ajaykumar.hotchandani@oracle.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Link: http://lkml.kernel.org/r/4EBD1CC5.3030008@oracle.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/cpu/mtrr/generic.c