diff options
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/kernel/pci.c | 3 | ||||
-rw-r--r-- | arch/sparc64/kernel/sparc64_ksyms.c | 3 | ||||
-rw-r--r-- | arch/sparc64/mm/generic.c | 31 |
3 files changed, 1 insertions, 36 deletions
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index f21c993f8856..ec8bf4012c0c 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -736,8 +736,7 @@ static void __pci_mmap_set_flags(struct pci_dev *dev, struct vm_area_struct *vma | |||
736 | static void __pci_mmap_set_pgprot(struct pci_dev *dev, struct vm_area_struct *vma, | 736 | static void __pci_mmap_set_pgprot(struct pci_dev *dev, struct vm_area_struct *vma, |
737 | enum pci_mmap_state mmap_state) | 737 | enum pci_mmap_state mmap_state) |
738 | { | 738 | { |
739 | /* Our io_remap_page_range/io_remap_pfn_range takes care of this, | 739 | /* Our io_remap_pfn_range takes care of this, do nothing. */ |
740 | do nothing. */ | ||
741 | } | 740 | } |
742 | 741 | ||
743 | /* Perform the actual remap of the pages for a PCI device mapping, as appropriate | 742 | /* Perform the actual remap of the pages for a PCI device mapping, as appropriate |
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index a3ea697f1adb..d89fc24808d3 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c | |||
@@ -88,8 +88,6 @@ extern int svr4_setcontext(svr4_ucontext_t *uc, struct pt_regs *regs); | |||
88 | extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg); | 88 | extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg); |
89 | extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *); | 89 | extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *); |
90 | extern long sparc32_open(const char __user * filename, int flags, int mode); | 90 | extern long sparc32_open(const char __user * filename, int flags, int mode); |
91 | extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, | ||
92 | unsigned long offset, unsigned long size, pgprot_t prot, int space); | ||
93 | extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | 91 | extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, |
94 | unsigned long pfn, unsigned long size, pgprot_t prot); | 92 | unsigned long pfn, unsigned long size, pgprot_t prot); |
95 | extern void (*prom_palette)(int); | 93 | extern void (*prom_palette)(int); |
@@ -245,7 +243,6 @@ EXPORT_SYMBOL(pci_dma_supported); | |||
245 | #endif | 243 | #endif |
246 | 244 | ||
247 | /* I/O device mmaping on Sparc64. */ | 245 | /* I/O device mmaping on Sparc64. */ |
248 | EXPORT_SYMBOL(io_remap_page_range); | ||
249 | EXPORT_SYMBOL(io_remap_pfn_range); | 246 | EXPORT_SYMBOL(io_remap_pfn_range); |
250 | 247 | ||
251 | /* Solaris/SunOS binary compatibility */ | 248 | /* Solaris/SunOS binary compatibility */ |
diff --git a/arch/sparc64/mm/generic.c b/arch/sparc64/mm/generic.c index 6b31f6117a95..c954d91f01d0 100644 --- a/arch/sparc64/mm/generic.c +++ b/arch/sparc64/mm/generic.c | |||
@@ -116,37 +116,6 @@ static inline int io_remap_pud_range(struct mm_struct *mm, pud_t * pud, unsigned | |||
116 | return 0; | 116 | return 0; |
117 | } | 117 | } |
118 | 118 | ||
119 | int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space) | ||
120 | { | ||
121 | int error = 0; | ||
122 | pgd_t * dir; | ||
123 | unsigned long beg = from; | ||
124 | unsigned long end = from + size; | ||
125 | struct mm_struct *mm = vma->vm_mm; | ||
126 | |||
127 | prot = __pgprot(pg_iobits); | ||
128 | offset -= from; | ||
129 | dir = pgd_offset(mm, from); | ||
130 | flush_cache_range(vma, beg, end); | ||
131 | |||
132 | spin_lock(&mm->page_table_lock); | ||
133 | while (from < end) { | ||
134 | pud_t *pud = pud_alloc(mm, dir, from); | ||
135 | error = -ENOMEM; | ||
136 | if (!pud) | ||
137 | break; | ||
138 | error = io_remap_pud_range(mm, pud, from, end - from, offset + from, prot, space); | ||
139 | if (error) | ||
140 | break; | ||
141 | from = (from + PGDIR_SIZE) & PGDIR_MASK; | ||
142 | dir++; | ||
143 | } | ||
144 | flush_tlb_range(vma, beg, end); | ||
145 | spin_unlock(&mm->page_table_lock); | ||
146 | |||
147 | return error; | ||
148 | } | ||
149 | |||
150 | int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, | 119 | int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, |
151 | unsigned long pfn, unsigned long size, pgprot_t prot) | 120 | unsigned long pfn, unsigned long size, pgprot_t prot) |
152 | { | 121 | { |