From: Yinghai Lu Date: Tue, 17 Nov 2009 07:04:56 +0000 (-0800) Subject: x86: When cleaning MTRRs, do not fold WP into UC X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=508d85c2c6bc8cba53d2a54d9a306ad64a0a80bf;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git x86: When cleaning MTRRs, do not fold WP into UC The current MTRR code treats WP as a form of UC. This really isn't desirable behaviour, except possibly in the case of severe MTRR shortage. Disable this, to allow legitimate uses of WP to remain unmolested. Signed-off-by: Yinghai Lu Signed-off-by: H. Peter Anvin Cc: Linus Torvalds --- diff --git a/arch/x86/kernel/cpu/mtrr/cleanup.c b/arch/x86/kernel/cpu/mtrr/cleanup.c index 315738c74aad..6e49f6f91f31 100644 --- a/arch/x86/kernel/cpu/mtrr/cleanup.c +++ b/arch/x86/kernel/cpu/mtrr/cleanup.c @@ -689,8 +689,6 @@ static int __init mtrr_need_cleanup(void) continue; if (!size) type = MTRR_NUM_TYPES; - if (type == MTRR_TYPE_WRPROT) - type = MTRR_TYPE_UNCACHABLE; num[type]++; }