diff options
Diffstat (limited to 'arch/xtensa/kernel/pci.c')
-rw-r--r-- | arch/xtensa/kernel/pci.c | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c index b848cc3dc913..903963ee495d 100644 --- a/arch/xtensa/kernel/pci.c +++ b/arch/xtensa/kernel/pci.c | |||
@@ -334,25 +334,6 @@ __pci_mmap_make_offset(struct pci_dev *dev, struct vm_area_struct *vma, | |||
334 | } | 334 | } |
335 | 335 | ||
336 | /* | 336 | /* |
337 | * Set vm_page_prot of VMA, as appropriate for this architecture, for a pci | ||
338 | * device mapping. | ||
339 | */ | ||
340 | static __inline__ void | ||
341 | __pci_mmap_set_pgprot(struct pci_dev *dev, struct vm_area_struct *vma, | ||
342 | enum pci_mmap_state mmap_state, int write_combine) | ||
343 | { | ||
344 | int prot = pgprot_val(vma->vm_page_prot); | ||
345 | |||
346 | /* Set to write-through */ | ||
347 | prot = (prot & _PAGE_CA_MASK) | _PAGE_CA_WT; | ||
348 | #if 0 | ||
349 | if (!write_combine) | ||
350 | prot |= _PAGE_WRITETHRU; | ||
351 | #endif | ||
352 | vma->vm_page_prot = __pgprot(prot); | ||
353 | } | ||
354 | |||
355 | /* | ||
356 | * Perform the actual remap of the pages for a PCI device mapping, as | 337 | * Perform the actual remap of the pages for a PCI device mapping, as |
357 | * appropriate for this architecture. The region in the process to map | 338 | * appropriate for this architecture. The region in the process to map |
358 | * is described by vm_start and vm_end members of VMA, the base physical | 339 | * is described by vm_start and vm_end members of VMA, the base physical |
@@ -362,7 +343,8 @@ __pci_mmap_set_pgprot(struct pci_dev *dev, struct vm_area_struct *vma, | |||
362 | * | 343 | * |
363 | * Returns a negative error code on failure, zero on success. | 344 | * Returns a negative error code on failure, zero on success. |
364 | */ | 345 | */ |
365 | int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | 346 | int pci_mmap_page_range(struct pci_dev *dev, int bar, |
347 | struct vm_area_struct *vma, | ||
366 | enum pci_mmap_state mmap_state, | 348 | enum pci_mmap_state mmap_state, |
367 | int write_combine) | 349 | int write_combine) |
368 | { | 350 | { |
@@ -372,7 +354,7 @@ int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
372 | if (ret < 0) | 354 | if (ret < 0) |
373 | return ret; | 355 | return ret; |
374 | 356 | ||
375 | __pci_mmap_set_pgprot(dev, vma, mmap_state, write_combine); | 357 | vma->vm_page_prot = pgprot_device(vma->vm_page_prot); |
376 | 358 | ||
377 | ret = io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, | 359 | ret = io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, |
378 | vma->vm_end - vma->vm_start,vma->vm_page_prot); | 360 | vma->vm_end - vma->vm_start,vma->vm_page_prot); |