patch-2.3.23 linux/arch/arm/mm/fault-armo.c

Next file: linux/arch/arm/mm/fault-armv.c
Previous file: linux/arch/arm/mm/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.22/linux/arch/arm/mm/fault-armo.c linux/arch/arm/mm/fault-armo.c
@@ -23,61 +23,12 @@
 #define FAULT_CODE_FORCECOW	0x80
 #define FAULT_CODE_PREFETCH	0x04
 #define FAULT_CODE_WRITE	0x02
-#define FAULT_CODE_USER		0x01
 
 #define DO_COW(m)		((m) & (FAULT_CODE_WRITE|FAULT_CODE_FORCECOW))
 #define READ_FAULT(m)		(!((m) & FAULT_CODE_WRITE))
 
 #include "fault-common.c"
 
-static void *alloc_table(int size, int prio)
-{
-	if (size != 128)
-		printk("invalid table size\n");
-	return (void *)get_page_8k(prio);
-}
-
-void free_table(void *table)
-{
-	free_page_8k((unsigned long)table);
-}
-
-pgd_t *get_pgd_slow(void)
-{
-	pgd_t *pgd = (pgd_t *)alloc_table(PTRS_PER_PGD * BYTES_PER_PTR, GFP_KERNEL);
-	pgd_t *init;
-
-	if (pgd) {
-		init = pgd_offset(&init_mm, 0);
-		memzero(pgd, USER_PTRS_PER_PGD * BYTES_PER_PTR);
-		memcpy(pgd + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
-			(PTRS_PER_PGD - USER_PTRS_PER_PGD) * BYTES_PER_PTR);
-	}
-	return pgd;
-}
-
-pte_t *get_pte_slow(pmd_t *pmd, unsigned long offset)
-{
-	pte_t *pte;
-
-	pte = (pte_t *)alloc_table(PTRS_PER_PTE * BYTES_PER_PTR, GFP_KERNEL);
-	if (pmd_none(*pmd)) {
-		if (pte) {
-			memzero(pte, PTRS_PER_PTE * BYTES_PER_PTR);
-			set_pmd(pmd, mk_pmd(pte));
-			return pte + offset;
-		}
-		set_pmd(pmd, mk_pmd(BAD_PAGETABLE));
-		return NULL;
-	}
-	free_table((void *)pte);
-	if (pmd_bad(*pmd)) {
-		__bad_pmd(pmd);
-		return NULL;
-	}
-	return (pte_t *) pmd_page(*pmd) + offset;
-}
-
 /*
  * Handle a data abort.  Note that we have to handle a range of addresses
  * on ARM2/3 for ldm.  If both pages are zero-mapped, then we have to force
@@ -96,11 +47,11 @@
 do_PrefetchAbort(unsigned long addr, struct pt_regs *regs)
 {
 #if 0
-	if (the memc mapping for this page exists - can check now...) {
+	if (the memc mapping for this page exists) {
 		printk ("Page in, but got abort (undefined instruction?)\n");
 		return 0;
 	}
 #endif
-	do_page_fault(addr, FAULT_CODE_USER|FAULT_CODE_PREFETCH, regs);
+	do_page_fault(addr, FAULT_CODE_PREFETCH, regs);
 	return 1;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)