aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/mtrr
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-10-04 17:50:33 -0400
committerH. Peter Anvin <hpa@zytor.com>2008-10-04 23:10:22 -0400
commitdd5523552c2897e3fde16fc2fc8f6332addf66ab (patch)
tree28b2b671d46a01344d24b7f73bfdd016f30eac60 /arch/x86/kernel/cpu/mtrr
parent99e1aa17ce434010dd820b583628370cc15f10f3 (diff)
x86: mtrr_cleanup: treat WRPROT as UNCACHEABLE
For the purpose of MTRR canonicalization, treat WRPROT as UNCACHEABLE. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/kernel/cpu/mtrr')
-rw-r--r--arch/x86/kernel/cpu/mtrr/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/mtrr/main.c b/arch/x86/kernel/cpu/mtrr/main.c
index 663e530e08e0..5994a9f78f3d 100644
--- a/arch/x86/kernel/cpu/mtrr/main.c
+++ b/arch/x86/kernel/cpu/mtrr/main.c
@@ -759,7 +759,8 @@ x86_get_mtrr_mem_range(struct res_range *range, int nr_range,
759 /* take out UC ranges */ 759 /* take out UC ranges */
760 for (i = 0; i < num_var_ranges; i++) { 760 for (i = 0; i < num_var_ranges; i++) {
761 type = range_state[i].type; 761 type = range_state[i].type;
762 if (type != MTRR_TYPE_UNCACHABLE) 762 if (type != MTRR_TYPE_UNCACHABLE &&
763 type != MTRR_TYPE_WRPROT)
763 continue; 764 continue;
764 size = range_state[i].size_pfn; 765 size = range_state[i].size_pfn;
765 if (!size) 766 if (!size)
@@ -1248,6 +1249,8 @@ static int __init mtrr_cleanup(unsigned address_bits)
1248 continue; 1249 continue;
1249 if (!size) 1250 if (!size)
1250 type = MTRR_NUM_TYPES; 1251 type = MTRR_NUM_TYPES;
1252 if (type == MTRR_TYPE_WRPROT)
1253 type = MTRR_TYPE_UNCACHABLE;
1251 num[type]++; 1254 num[type]++;
1252 } 1255 }
1253 1256