|
@@ -280,6 +280,15 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|
|
prot = pgprot_val(vma->vm_page_prot);
|
|
prot = pgprot_val(vma->vm_page_prot);
|
|
|
|
+
|
|
|
|
+ /*
|
|
|
|
+ * Return error if pat is not enabled and write_combine is requested.
|
|
|
|
+ * Caller can followup with UC MINUS request and add a WC mtrr if there
|
|
|
|
+ * is a free mtrr slot.
|
|
|
|
+ */
|
|
|
|
+ if (!pat_enabled && write_combine)
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
if (pat_enabled && write_combine)
|
|
if (pat_enabled && write_combine)
|
|
prot |= _PAGE_CACHE_WC;
|
|
prot |= _PAGE_CACHE_WC;
|
|
else if (pat_enabled || boot_cpu_data.x86 > 3)
|
|
else if (pat_enabled || boot_cpu_data.x86 > 3)
|