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.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
index 4ebf52f6b1fd..2ead72363077 100644
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -328,6 +328,7 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
328 unsigned long len = vma->vm_end - vma->vm_start; 328 unsigned long len = vma->vm_end - vma->vm_start;
329 unsigned long flags; 329 unsigned long flags;
330 unsigned long new_flags; 330 unsigned long new_flags;
331 int retval;
331 332
332 /* I/O space cannot be accessed via normal processor loads and 333 /* I/O space cannot be accessed via normal processor loads and
333 * stores on this platform. 334 * stores on this platform.
@@ -344,7 +345,11 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
344 vma->vm_page_prot = __pgprot(prot); 345 vma->vm_page_prot = __pgprot(prot);
345 346
346 flags = pgprot_val(vma->vm_page_prot) & _PAGE_CACHE_MASK; 347 flags = pgprot_val(vma->vm_page_prot) & _PAGE_CACHE_MASK;
347 if (reserve_memtype(addr, addr + len, flags, &new_flags)) { 348 retval = reserve_memtype(addr, addr + len, flags, &new_flags);
349 if (retval)
350 return retval;
351
352 if (flags != new_flags) {
348 /* 353 /*
349 * Do not fallback to certain memory types with certain 354 * Do not fallback to certain memory types with certain
350 * requested type: 355 * requested type: