aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/pci/i386.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/pci/i386.c')
-rw-r--r--arch/x86/pci/i386.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index a70a85de5e84..52e656f17781 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -280,6 +280,15 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
280 return -EINVAL; 280 return -EINVAL;
281 281
282 prot = pgprot_val(vma->vm_page_prot); 282 prot = pgprot_val(vma->vm_page_prot);
283
284 /*
285 * Return error if pat is not enabled and write_combine is requested.
286 * Caller can followup with UC MINUS request and add a WC mtrr if there
287 * is a free mtrr slot.
288 */
289 if (!pat_enabled && write_combine)
290 return -EINVAL;
291
283 if (pat_enabled && write_combine) 292 if (pat_enabled && write_combine)
284 prot |= _PAGE_CACHE_WC; 293 prot |= _PAGE_CACHE_WC;
285 else if (pat_enabled || boot_cpu_data.x86 > 3) 294 else if (pat_enabled || boot_cpu_data.x86 > 3)