|
@@ -77,13 +77,13 @@ void __iomem *
|
|
|
iomap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot)
|
|
|
{
|
|
|
/*
|
|
|
- * For non-PAT systems, promote PAGE_KERNEL_WC to PAGE_KERNEL_UC_MINUS.
|
|
|
- * PAGE_KERNEL_WC maps to PWT, which translates to uncached if the
|
|
|
- * MTRR is UC or WC. UC_MINUS gets the real intention, of the
|
|
|
- * user, which is "WC if the MTRR is WC, UC if you can't do that."
|
|
|
+ * For non-PAT systems, translate non-WB request to UC- just in
|
|
|
+ * case the caller set the PWT bit to prot directly without using
|
|
|
+ * pgprot_writecombine(). UC- translates to uncached if the MTRR
|
|
|
+ * is UC or WC. UC- gets the real intention, of the user, which is
|
|
|
+ * "WC if the MTRR is WC, UC if you can't do that."
|
|
|
*/
|
|
|
- if (!pat_enabled() && pgprot_val(prot) ==
|
|
|
- (__PAGE_KERNEL | cachemode2protval(_PAGE_CACHE_MODE_WC)))
|
|
|
+ if (!pat_enabled() && pgprot2cachemode(prot) != _PAGE_CACHE_MODE_WB)
|
|
|
prot = __pgprot(__PAGE_KERNEL |
|
|
|
cachemode2protval(_PAGE_CACHE_MODE_UC_MINUS));
|
|
|
|