diff options
Diffstat (limited to 'arch/ia64/pci/pci.c')
-rw-r--r-- | arch/ia64/pci/pci.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 8f6ac2f8ae4c..4068bde623dc 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
@@ -418,52 +418,6 @@ pcibios_align_resource (void *data, const struct resource *res, | |||
418 | return res->start; | 418 | return res->start; |
419 | } | 419 | } |
420 | 420 | ||
421 | int | ||
422 | pci_mmap_page_range (struct pci_dev *dev, struct vm_area_struct *vma, | ||
423 | enum pci_mmap_state mmap_state, int write_combine) | ||
424 | { | ||
425 | unsigned long size = vma->vm_end - vma->vm_start; | ||
426 | pgprot_t prot; | ||
427 | |||
428 | /* | ||
429 | * I/O space cannot be accessed via normal processor loads and | ||
430 | * stores on this platform. | ||
431 | */ | ||
432 | if (mmap_state == pci_mmap_io) | ||
433 | /* | ||
434 | * XXX we could relax this for I/O spaces for which ACPI | ||
435 | * indicates that the space is 1-to-1 mapped. But at the | ||
436 | * moment, we don't support multiple PCI address spaces and | ||
437 | * the legacy I/O space is not 1-to-1 mapped, so this is moot. | ||
438 | */ | ||
439 | return -EINVAL; | ||
440 | |||
441 | if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size)) | ||
442 | return -EINVAL; | ||
443 | |||
444 | prot = phys_mem_access_prot(NULL, vma->vm_pgoff, size, | ||
445 | vma->vm_page_prot); | ||
446 | |||
447 | /* | ||
448 | * If the user requested WC, the kernel uses UC or WC for this region, | ||
449 | * and the chipset supports WC, we can use WC. Otherwise, we have to | ||
450 | * use the same attribute the kernel uses. | ||
451 | */ | ||
452 | if (write_combine && | ||
453 | ((pgprot_val(prot) & _PAGE_MA_MASK) == _PAGE_MA_UC || | ||
454 | (pgprot_val(prot) & _PAGE_MA_MASK) == _PAGE_MA_WC) && | ||
455 | efi_range_is_wc(vma->vm_start, vma->vm_end - vma->vm_start)) | ||
456 | vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); | ||
457 | else | ||
458 | vma->vm_page_prot = prot; | ||
459 | |||
460 | if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, | ||
461 | vma->vm_end - vma->vm_start, vma->vm_page_prot)) | ||
462 | return -EAGAIN; | ||
463 | |||
464 | return 0; | ||
465 | } | ||
466 | |||
467 | /** | 421 | /** |
468 | * ia64_pci_get_legacy_mem - generic legacy mem routine | 422 | * ia64_pci_get_legacy_mem - generic legacy mem routine |
469 | * @bus: bus to get legacy memory base address for | 423 | * @bus: bus to get legacy memory base address for |