x86: When cleaning MTRRs, do not fold WP into UC
authorYinghai Lu <yinghai@kernel.org>
Tue, 17 Nov 2009 07:04:56 +0000 (23:04 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 17 Nov 2009 18:26:53 +0000 (10:26 -0800)
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 <yinghai@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/kernel/cpu/mtrr/cleanup.c

index 315738c74aad519b7d7e31d8e5a1d004bcf0a265..6e49f6f91f31414786217766a2e572dd837c728e 100644 (file)
@@ -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]++;
        }