diff options
author | Venkatesh Pallipadi <venki@google.com> | 2010-09-10 15:55:50 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-09-10 16:11:20 -0700 |
commit | 351e5a703ad994405bd900da330823d3b4a372e0 (patch) | |
tree | c1ed671db8277d5f04e5a9e695e5d71fb8349f73 /arch/x86/kernel/cpu/mtrr/if.c | |
parent | a7f07cfbaa1dd5bf9e615948f280c92e7928e6f7 (diff) | |
download | blackbird-op-linux-351e5a703ad994405bd900da330823d3b4a372e0.tar.gz blackbird-op-linux-351e5a703ad994405bd900da330823d3b4a372e0.zip |
x86, mtrr: Support mtrr lookup for range spanning across MTRR range
mtrr_type_lookup [start:end] looked up the resultant MTRR type for that
range, based on fixed and all variable MTRR ranges. It did check for multiple
MTRR var ranges overlapping [start:end] and returned the net type.
However, if the [start:end] range spanned across any var MTRR range,
mtrr_type_lookup would return an error return of 0xFE. This was based on
typical usage of mtrr_type_lookup in PAT mapping, where region being
mapped would not normally span across MTRR ranges and also trying
to keep the code simple.
Mark recently reported the problem with this limitation. When there are
two continguous MTRR's of type "writeback" and if there is a memory mapping
over a region starting in one MTRR range and ending in another MTRR range,
such mapping will fallback to "uncached" due to the above limitation.
Change below adds support for such lookups spanning multiple MTRR ranges.
We now have a wrapper mtrr_type_lookup that dynamically splits such a region
into smaller chunks that fit within one MTRR range and does a
__mtrr_type_lookup on it and combine the results later.
Reported-by: Mark Langsdorf <mark.langsdorf@amd.com>
Signed-off-by: Venkatesh Pallipadi <venki@google.com>
LKML-Reference: <1284159350-19841-3-git-send-email-venki@google.com>
Reviewed-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'arch/x86/kernel/cpu/mtrr/if.c')
0 files changed, 0 insertions, 0 deletions