diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-24 00:12:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-24 00:12:35 +0000 |
commit | 482368b1a8e45430672c58c9a42e7d2004367126 (patch) | |
tree | ce2a1a567d4d62dee7c2e71a46a99cf72cf1d606 /arch/sparc/mm/sun4c.c | |
parent | e4d0251c6f56ab2e191afb70f80f382793e23f74 (diff) |
Merge with 2.3.47. Guys, this is buggy as shit. You've been warned.
Diffstat (limited to 'arch/sparc/mm/sun4c.c')
-rw-r--r-- | arch/sparc/mm/sun4c.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index 715bdb864..6e93111ae 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c @@ -1,4 +1,4 @@ -/* $Id: sun4c.c,v 1.187 2000/02/08 07:46:01 davem Exp $ +/* $Id: sun4c.c,v 1.190 2000/02/14 04:52:34 jj Exp $ * sun4c.c: Doing in software what should be done in hardware. * * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) @@ -591,7 +591,7 @@ static unsigned long sun4c_translate_dvma(unsigned long busa) return (pte << PAGE_SHIFT) + PAGE_OFFSET; } -static unsigned long sun4c_unmap_dma_area(unsigned long busa, int len) +static void sun4c_unmap_dma_area(unsigned long busa, int len) { /* Fortunately for us, bus_addr == uncached_virt in sun4c. */ /* XXX Implement this */ @@ -2185,7 +2185,7 @@ static unsigned long sun4c_pgd_page(pgd_t pgd) } /* to find an entry in a page-table-directory */ -pgd_t *sun4c_pgd_offset(struct mm_struct * mm, unsigned long address) +extern inline pgd_t *sun4c_pgd_offset(struct mm_struct * mm, unsigned long address) { return mm->pgd + (address >> SUN4C_PGDIR_SHIFT); } @@ -2273,7 +2273,7 @@ extern __inline__ pgd_t *sun4c_get_pgd_fast(void) ret = (unsigned long *)__get_free_page(GFP_KERNEL); memset (ret, 0, (KERNBASE / SUN4C_PGDIR_SIZE) * sizeof(pgd_t)); - init = pgd_offset(&init_mm, 0); + init = sun4c_pgd_offset(&init_mm, 0); memcpy (((pgd_t *)ret) + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD, (PTRS_PER_PGD - USER_PTRS_PER_PGD) * sizeof(pgd_t)); } @@ -2418,11 +2418,12 @@ static void sun4c_vac_alias_fixup(struct vm_area_struct *vma, unsigned long addr if(dentry) inode = dentry->d_inode; if(inode) { + struct address_space *mapping = inode->i_mapping; unsigned long offset = (address & PAGE_MASK) - vma->vm_start; struct vm_area_struct *vmaring; int alias_found = 0; - spin_lock(&inode->i_shared_lock); - vmaring = inode->i_mmap; + spin_lock(&mapping->i_shared_lock); + vmaring = mapping->i_mmap; do { unsigned long vaddr = vmaring->vm_start + offset; unsigned long start; @@ -2453,7 +2454,7 @@ static void sun4c_vac_alias_fixup(struct vm_area_struct *vma, unsigned long addr } } } while ((vmaring = vmaring->vm_next_share) != NULL); - spin_unlock(&inode->i_shared_lock); + spin_unlock(&mapping->i_shared_lock); if (alias_found && !(pte_val(pte) & _SUN4C_PAGE_NOCACHE)) { pgdp = sun4c_pgd_offset(vma->vm_mm, address); @@ -2695,7 +2696,6 @@ void __init ld_mmu_sun4c(void) BTFIXUPSET_CALL(mk_pte_io, sun4c_mk_pte_io, BTFIXUPCALL_NORM); BTFIXUPSET_INT(pte_modify_mask, _SUN4C_PAGE_CHG_MASK); - BTFIXUPSET_CALL(pgd_offset, sun4c_pgd_offset, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(pmd_offset, sun4c_pmd_offset, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(pte_offset, sun4c_pte_offset, BTFIXUPCALL_NORM); BTFIXUPSET_CALL(pte_free_kernel, sun4c_pte_free_kernel, BTFIXUPCALL_NORM); |