X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fx86%2Fpci%2Fi386.c;h=10fb308fded8efc85bfbbe7e4630f44342991e0a;hb=28638ea4f8adb63f837e4436560ab16ab0388587;hp=94f6c73a53d0aae6ac048668ea6b06a0a1f370d0;hpb=595f403c1af37b1339e64b89040528b8cd48c5a3;p=linux-2.6-omap-h63xx.git diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c index 94f6c73a53d..10fb308fded 100644 --- a/arch/x86/pci/i386.c +++ b/arch/x86/pci/i386.c @@ -301,8 +301,13 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, prot = pgprot_val(vma->vm_page_prot); if (pat_wc_enabled && write_combine) prot |= _PAGE_CACHE_WC; - else if (boot_cpu_data.x86 > 3) - prot |= _PAGE_CACHE_UC; + else if (pat_wc_enabled || boot_cpu_data.x86 > 3) + /* + * ioremap() and ioremap_nocache() defaults to UC MINUS for now. + * To avoid attribute conflicts, request UC MINUS here + * aswell. + */ + prot |= _PAGE_CACHE_UC_MINUS; vma->vm_page_prot = __pgprot(prot); @@ -319,9 +324,8 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, * - request is uncached, return cannot be write-combine * - request is write-combine, return cannot be write-back */ - if ((flags == _PAGE_CACHE_UC && - (new_flags == _PAGE_CACHE_WB || - new_flags == _PAGE_CACHE_WC)) || + if ((flags == _PAGE_CACHE_UC_MINUS && + (new_flags == _PAGE_CACHE_WB)) || (flags == _PAGE_CACHE_WC && new_flags == _PAGE_CACHE_WB)) { free_memtype(addr, addr+len);