diff options
Diffstat (limited to 'arch/x86/pci/i386.c')
-rw-r--r-- | arch/x86/pci/i386.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 94f6c73a53d0..8af0f0bae2af 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c | |||
@@ -301,6 +301,13 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
301 | prot = pgprot_val(vma->vm_page_prot); | 301 | prot = pgprot_val(vma->vm_page_prot); |
302 | if (pat_wc_enabled && write_combine) | 302 | if (pat_wc_enabled && write_combine) |
303 | prot |= _PAGE_CACHE_WC; | 303 | prot |= _PAGE_CACHE_WC; |
304 | else if (pat_wc_enabled) | ||
305 | /* | ||
306 | * ioremap() and ioremap_nocache() defaults to UC MINUS for now. | ||
307 | * To avoid attribute conflicts, request UC MINUS here | ||
308 | * aswell. | ||
309 | */ | ||
310 | prot |= _PAGE_CACHE_UC_MINUS; | ||
304 | else if (boot_cpu_data.x86 > 3) | 311 | else if (boot_cpu_data.x86 > 3) |
305 | prot |= _PAGE_CACHE_UC; | 312 | prot |= _PAGE_CACHE_UC; |
306 | 313 | ||
@@ -319,9 +326,8 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
319 | * - request is uncached, return cannot be write-combine | 326 | * - request is uncached, return cannot be write-combine |
320 | * - request is write-combine, return cannot be write-back | 327 | * - request is write-combine, return cannot be write-back |
321 | */ | 328 | */ |
322 | if ((flags == _PAGE_CACHE_UC && | 329 | if ((flags == _PAGE_CACHE_UC_MINUS && |
323 | (new_flags == _PAGE_CACHE_WB || | 330 | (new_flags == _PAGE_CACHE_WB)) || |
324 | new_flags == _PAGE_CACHE_WC)) || | ||
325 | (flags == _PAGE_CACHE_WC && | 331 | (flags == _PAGE_CACHE_WC && |
326 | new_flags == _PAGE_CACHE_WB)) { | 332 | new_flags == _PAGE_CACHE_WB)) { |
327 | free_memtype(addr, addr+len); | 333 | free_memtype(addr, addr+len); |