patch-2.1.51 linux/arch/sparc64/mm/fault.c

Next file: linux/arch/sparc64/mm/init.c
Previous file: linux/arch/sparc64/lib/locks.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.50/linux/arch/sparc64/mm/fault.c linux/arch/sparc64/mm/fault.c
@@ -217,56 +217,3 @@
 out:
 	unlock_kernel();
 }
-
-void fixup_dcache_alias(struct vm_area_struct *vma, unsigned long address, pte_t pte)
-{
-	struct vm_area_struct *vmaring;
-	struct inode *inode;
-	unsigned long vaddr, offset, start;
-	pgd_t *pgdp;
-	pmd_t *pmdp;
-	pte_t *ptep;
-	int alias_found = 0;
-
-	inode = vma->vm_dentry->d_inode;
-	if(!inode)
-		return;
-
-	offset = (address & PAGE_MASK) - vma->vm_start;
-	vmaring = inode->i_mmap;
-	do {
-		vaddr = vmaring->vm_start + offset;
-
-		/* This conditional is misleading... */
-		if((vaddr ^ address) & PAGE_SIZE) {
-			alias_found++;
-			start = vmaring->vm_start;
-			while(start < vmaring->vm_end) {
-				pgdp = pgd_offset(vmaring->vm_mm, start);
-				if(!pgdp) goto next;
-				pmdp = pmd_offset(pgdp, start);
-				if(!pmdp) goto next;
-				ptep = pte_offset(pmdp, start);
-				if(!ptep) goto next;
-
-				if(pte_val(*ptep) & _PAGE_PRESENT) {
-					flush_cache_page(vmaring, start);
-					*ptep = __pte(pte_val(*ptep) &
-						      ~(_PAGE_CV));
-					flush_tlb_page(vmaring, start);
-				}
-			next:
-				start += PAGE_SIZE;
-			}
-		}
-	} while((vmaring = vmaring->vm_next_share) != NULL);
-
-	if(alias_found && (pte_val(pte) & _PAGE_CV)) {
-		pgdp = pgd_offset(vma->vm_mm, address);
-		pmdp = pmd_offset(pgdp, address);
-		ptep = pte_offset(pmdp, address);
-		flush_cache_page(vma, address);
-		*ptep = __pte(pte_val(*ptep) & ~(_PAGE_CV));
-		flush_tlb_page(vma, address);
-	}
-}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov