aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm/pat.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2008-12-20 04:54:54 -0500
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2008-12-20 04:54:54 -0500
commit93b8eef1c098efbea2f1fc0be7e3c681f259a7e7 (patch)
tree462cc8c2bc07bbc825dab2a200891a28d8643329 /arch/x86/mm/pat.c
parentInput: libps2 - handle 0xfc responses from devices (diff)
parentLinux 2.6.28-rc9 (diff)
downloadlinux-dev-93b8eef1c098efbea2f1fc0be7e3c681f259a7e7.tar.xz
linux-dev-93b8eef1c098efbea2f1fc0be7e3c681f259a7e7.zip
Merge commit 'v2.6.28-rc9' into next
Diffstat (limited to 'arch/x86/mm/pat.c')
-rw-r--r--arch/x86/mm/pat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 738fd0f24958..eb1bf000d12e 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -481,12 +481,16 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size)
return 1;
}
#else
+/* This check is needed to avoid cache aliasing when PAT is enabled */
static inline int range_is_allowed(unsigned long pfn, unsigned long size)
{
u64 from = ((u64)pfn) << PAGE_SHIFT;
u64 to = from + size;
u64 cursor = from;
+ if (!pat_enabled)
+ return 1;
+
while (cursor < to) {
if (!devmem_is_allowed(pfn)) {
printk(KERN_INFO