diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-12-12 11:59:39 +0100 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-12-12 11:59:39 +0100 |
| commit | fd10902797fc9d6abaf55d9c2e3c6698c90b10c7 (patch) | |
| tree | 0bc15b8b967e6f0973387e7c81f5b0dc9ce44e75 /arch/mips/pci/pci.c | |
| parent | 5b3eec0c80038c8739ccd465b897a35c0dff1cc4 (diff) | |
| parent | 8b1fae4e4200388b64dd88065639413cb3f1051c (diff) | |
Merge commit 'v2.6.28-rc8' into x86/irq
Diffstat (limited to 'arch/mips/pci/pci.c')
| -rw-r--r-- | arch/mips/pci/pci.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index a377e9d2d029..62cae740e250 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c @@ -354,6 +354,30 @@ EXPORT_SYMBOL(PCIBIOS_MIN_IO); EXPORT_SYMBOL(PCIBIOS_MIN_MEM); #endif +int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, + enum pci_mmap_state mmap_state, int write_combine) +{ + unsigned long prot; + + /* + * I/O space can be accessed via normal processor loads and stores on + * this platform but for now we elect not to do this and portable + * drivers should not do this anyway. + */ + if (mmap_state == pci_mmap_io) + return -EINVAL; + + /* + * Ignore write-combine; for now only return uncached mappings. + */ + prot = pgprot_val(vma->vm_page_prot); + prot = (prot & ~_CACHE_MASK) | _CACHE_UNCACHED; + vma->vm_page_prot = __pgprot(prot); + + return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, + vma->vm_end - vma->vm_start, vma->vm_page_prot); +} + char * (*pcibios_plat_setup)(char *str) __devinitdata; char *__devinit pcibios_setup(char *str) |
