patch-2.1.40 linux/arch/m68k/mm/fault.c

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

diff -u --recursive --new-file v2.1.39/linux/arch/m68k/mm/fault.c linux/arch/m68k/mm/fault.c
@@ -32,14 +32,10 @@
 asmlinkage int do_page_fault(struct pt_regs *regs, unsigned long address,
 			      unsigned long error_code)
 {
-	void (*handler)(struct task_struct *,
-			struct vm_area_struct *,
-			unsigned long,
-			int);
 	struct task_struct *tsk = current;
 	struct mm_struct *mm = tsk->mm;
 	struct vm_area_struct * vma;
-	unsigned long fixup, fault_pc;
+	unsigned long fixup;
 	int write;
 
 #ifdef DEBUG
@@ -73,10 +69,8 @@
  */
 good_area:
 	write = 0;
-	handler = do_no_page;
 	switch (error_code & 3) {
 		default:	/* 3: write, present */
-			handler = do_wp_page;
 			/* fall through */
 		case 2:		/* write, not present */
 			if (!(vma->vm_flags & VM_WRITE))
@@ -89,7 +83,7 @@
 			if (!(vma->vm_flags & (VM_READ | VM_EXEC)))
 				goto bad_area;
 	}
-	handler(tsk, vma, address, write);
+	handle_mm_fault(current, vma, address, write);
 	up(&mm->mmap_sem);
 
 	/* There seems to be a missing invalidate somewhere in do_no_page.
@@ -108,10 +102,10 @@
 	up(&mm->mmap_sem);
 
 	/* Are we prepared to handle this fault?  */
-	fault_pc = regs->pc;
-	if ((fixup = search_exception_table(fault_pc)) != 0) {
+	if ((fixup = search_exception_table(regs->pc)) != 0) {
 		struct pt_regs *tregs;
-		printk(KERN_DEBUG "Exception at [<%lx>] (%lx)\n", fault_pc, fixup);
+		printk(KERN_DEBUG "%s: Exception at [<%lx>] (%lx)\n",
+		       current->comm, regs->pc, fixup);
 		/* Create a new four word stack frame, discarding the old
 		   one.  */
 		regs->stkadj = frame_extra_sizes[regs->format];

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