mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 22:02:28 +00:00
[SPARC]: Kill io_remap_page_range()
It's been deprecated long enough and there are no in-tree users any longer. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8a36895c0d
commit
a7a6cac204
@ -175,7 +175,6 @@ EXPORT_SYMBOL(set_auxio);
|
||||
EXPORT_SYMBOL(get_auxio);
|
||||
#endif
|
||||
EXPORT_SYMBOL(request_fast_irq);
|
||||
EXPORT_SYMBOL(io_remap_page_range);
|
||||
EXPORT_SYMBOL(io_remap_pfn_range);
|
||||
/* P3: iounit_xxx may be needed, sun4d users */
|
||||
/* EXPORT_SYMBOL(iounit_map_dma_init); */
|
||||
|
@ -16,31 +16,6 @@
|
||||
#include <asm/cacheflush.h>
|
||||
#include <asm/tlbflush.h>
|
||||
|
||||
static inline void forget_pte(pte_t page)
|
||||
{
|
||||
#if 0 /* old 2.4 code */
|
||||
if (pte_none(page))
|
||||
return;
|
||||
if (pte_present(page)) {
|
||||
unsigned long pfn = pte_pfn(page);
|
||||
struct page *ptpage;
|
||||
if (!pfn_valid(pfn))
|
||||
return;
|
||||
ptpage = pfn_to_page(pfn);
|
||||
if (PageReserved(ptpage))
|
||||
return;
|
||||
page_cache_release(ptpage);
|
||||
return;
|
||||
}
|
||||
swap_free(pte_to_swp_entry(page));
|
||||
#else
|
||||
if (!pte_none(page)) {
|
||||
printk("forget_pte: old mapping existed!\n");
|
||||
BUG();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Remap IO memory, the same way as remap_pfn_range(), but use
|
||||
* the obio memory space.
|
||||
*
|
||||
@ -60,7 +35,6 @@ static inline void io_remap_pte_range(struct mm_struct *mm, pte_t * pte, unsigne
|
||||
pte_t oldpage = *pte;
|
||||
pte_clear(mm, address, pte);
|
||||
set_pte(pte, mk_pte_io(offset, prot, space));
|
||||
forget_pte(oldpage);
|
||||
address += PAGE_SIZE;
|
||||
offset += PAGE_SIZE;
|
||||
pte++;
|
||||
@ -88,37 +62,6 @@ static inline int io_remap_pmd_range(struct mm_struct *mm, pmd_t * pmd, unsigned
|
||||
return 0;
|
||||
}
|
||||
|
||||
int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space)
|
||||
{
|
||||
int error = 0;
|
||||
pgd_t * dir;
|
||||
unsigned long beg = from;
|
||||
unsigned long end = from + size;
|
||||
struct mm_struct *mm = vma->vm_mm;
|
||||
|
||||
prot = __pgprot(pg_iobits);
|
||||
offset -= from;
|
||||
dir = pgd_offset(mm, from);
|
||||
flush_cache_range(vma, beg, end);
|
||||
|
||||
spin_lock(&mm->page_table_lock);
|
||||
while (from < end) {
|
||||
pmd_t *pmd = pmd_alloc(current->mm, dir, from);
|
||||
error = -ENOMEM;
|
||||
if (!pmd)
|
||||
break;
|
||||
error = io_remap_pmd_range(mm, pmd, from, end - from, offset + from, prot, space);
|
||||
if (error)
|
||||
break;
|
||||
from = (from + PGDIR_SIZE) & PGDIR_MASK;
|
||||
dir++;
|
||||
}
|
||||
spin_unlock(&mm->page_table_lock);
|
||||
|
||||
flush_tlb_range(vma, beg, end);
|
||||
return error;
|
||||
}
|
||||
|
||||
int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
|
||||
unsigned long pfn, unsigned long size, pgprot_t prot)
|
||||
{
|
||||
|
@ -736,8 +736,7 @@ static void __pci_mmap_set_flags(struct pci_dev *dev, struct vm_area_struct *vma
|
||||
static void __pci_mmap_set_pgprot(struct pci_dev *dev, struct vm_area_struct *vma,
|
||||
enum pci_mmap_state mmap_state)
|
||||
{
|
||||
/* Our io_remap_page_range/io_remap_pfn_range takes care of this,
|
||||
do nothing. */
|
||||
/* Our io_remap_pfn_range takes care of this, do nothing. */
|
||||
}
|
||||
|
||||
/* Perform the actual remap of the pages for a PCI device mapping, as appropriate
|
||||
|
@ -88,8 +88,6 @@ extern int svr4_setcontext(svr4_ucontext_t *uc, struct pt_regs *regs);
|
||||
extern int compat_sys_ioctl(unsigned int fd, unsigned int cmd, u32 arg);
|
||||
extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *);
|
||||
extern long sparc32_open(const char __user * filename, int flags, int mode);
|
||||
extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from,
|
||||
unsigned long offset, unsigned long size, pgprot_t prot, int space);
|
||||
extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
|
||||
unsigned long pfn, unsigned long size, pgprot_t prot);
|
||||
extern void (*prom_palette)(int);
|
||||
@ -245,7 +243,6 @@ EXPORT_SYMBOL(pci_dma_supported);
|
||||
#endif
|
||||
|
||||
/* I/O device mmaping on Sparc64. */
|
||||
EXPORT_SYMBOL(io_remap_page_range);
|
||||
EXPORT_SYMBOL(io_remap_pfn_range);
|
||||
|
||||
/* Solaris/SunOS binary compatibility */
|
||||
|
@ -116,37 +116,6 @@ static inline int io_remap_pud_range(struct mm_struct *mm, pud_t * pud, unsigned
|
||||
return 0;
|
||||
}
|
||||
|
||||
int io_remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long offset, unsigned long size, pgprot_t prot, int space)
|
||||
{
|
||||
int error = 0;
|
||||
pgd_t * dir;
|
||||
unsigned long beg = from;
|
||||
unsigned long end = from + size;
|
||||
struct mm_struct *mm = vma->vm_mm;
|
||||
|
||||
prot = __pgprot(pg_iobits);
|
||||
offset -= from;
|
||||
dir = pgd_offset(mm, from);
|
||||
flush_cache_range(vma, beg, end);
|
||||
|
||||
spin_lock(&mm->page_table_lock);
|
||||
while (from < end) {
|
||||
pud_t *pud = pud_alloc(mm, dir, from);
|
||||
error = -ENOMEM;
|
||||
if (!pud)
|
||||
break;
|
||||
error = io_remap_pud_range(mm, pud, from, end - from, offset + from, prot, space);
|
||||
if (error)
|
||||
break;
|
||||
from = (from + PGDIR_SIZE) & PGDIR_MASK;
|
||||
dir++;
|
||||
}
|
||||
flush_tlb_range(vma, beg, end);
|
||||
spin_unlock(&mm->page_table_lock);
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
|
||||
unsigned long pfn, unsigned long size, pgprot_t prot)
|
||||
{
|
||||
|
@ -435,9 +435,6 @@ extern unsigned long *sparc_valid_addr_bitmap;
|
||||
#define kern_addr_valid(addr) \
|
||||
(test_bit(__pa((unsigned long)(addr))>>20, sparc_valid_addr_bitmap))
|
||||
|
||||
extern int io_remap_page_range(struct vm_area_struct *vma,
|
||||
unsigned long from, unsigned long to,
|
||||
unsigned long size, pgprot_t prot, int space);
|
||||
extern int io_remap_pfn_range(struct vm_area_struct *vma,
|
||||
unsigned long from, unsigned long pfn,
|
||||
unsigned long size, pgprot_t prot);
|
||||
|
@ -410,9 +410,6 @@ extern unsigned long *sparc64_valid_addr_bitmap;
|
||||
#define kern_addr_valid(addr) \
|
||||
(test_bit(__pa((unsigned long)(addr))>>22, sparc64_valid_addr_bitmap))
|
||||
|
||||
extern int io_remap_page_range(struct vm_area_struct *vma, unsigned long from,
|
||||
unsigned long offset,
|
||||
unsigned long size, pgprot_t prot, int space);
|
||||
extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from,
|
||||
unsigned long pfn,
|
||||
unsigned long size, pgprot_t prot);
|
||||
|
Loading…
Reference in New Issue
Block a user