x86: set strong uncacheable where UC is really desired
authorSiddha, Suresh B <suresh.b.siddha@intel.com>
Wed, 30 Jan 2008 12:33:43 +0000 (13:33 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 30 Jan 2008 12:33:43 +0000 (13:33 +0100)
Also use _PAGE_PWT for all the mappings which need uncache mapping.
Instead of existing PAT2 which is UC- (and can be overwritten by MTRRs),
we now use PAT3 which is strong uncacheable.

This makes it consistent with pgprot_noncached()

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/mm/ioremap_32.c
arch/x86/mm/ioremap_64.c

index 0b278315d73796e1707b94fdaa1bbba35a088881..ef0f6a452ee1142126f6fd6aae7de6ceeb1e4b1e 100644 (file)
@@ -119,7 +119,7 @@ EXPORT_SYMBOL(__ioremap);
 void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size)
 {
        unsigned long last_addr;
-       void __iomem *p = __ioremap(phys_addr, size, _PAGE_PCD);
+       void __iomem *p = __ioremap(phys_addr, size, _PAGE_PCD | _PAGE_PWT);
        if (!p) 
                return p; 
 
index d6cf1497682742bf9f7af208c0e41be25febcdd9..2815ab60009b44f1797a84b2dc040927e229be5b 100644 (file)
@@ -138,7 +138,7 @@ EXPORT_SYMBOL(__ioremap);
 
 void __iomem *ioremap_nocache (unsigned long phys_addr, unsigned long size)
 {
-       return __ioremap(phys_addr, size, _PAGE_PCD);
+       return __ioremap(phys_addr, size, _PAGE_PCD | _PAGE_PWT);
 }
 EXPORT_SYMBOL(ioremap_nocache);