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

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

diff -u --recursive --new-file v2.3.22/linux/arch/arm/mm/fault-common.c linux/arch/arm/mm/fault-common.c
@@ -30,7 +30,7 @@
  * This is useful to dump out the page tables associated with
  * 'addr' in mm 'mm'.
  */
-void show_pte(struct mm_struct *mm, unsigned long addr)
+static void show_pte(struct mm_struct *mm, unsigned long addr)
 {
 	pgd_t *pgd;
 
@@ -62,7 +62,9 @@
 
 		pte = pte_offset(pmd, addr);
 		printk(", *pte = %08lx", pte_val(*pte));
+#ifdef CONFIG_CPU_32
 		printk(", *ppte = %08lx", pte_val(pte[-PTRS_PER_PTE]));
+#endif
 	} while(0);
 
 	printk("\n");
@@ -73,7 +75,7 @@
  * terminate things with extreme prejudice.
  */
 static void
-kernel_page_fault(unsigned long addr, int mode, struct pt_regs *regs,
+kernel_page_fault(unsigned long addr, int write_access, struct pt_regs *regs,
 		  struct task_struct *tsk, struct mm_struct *mm)
 {
 	char *reason;
@@ -90,7 +92,7 @@
 
 	printk(KERN_ALERT "pgd = %p\n", mm->pgd);
 	show_pte(mm, addr);
-	die("Oops", regs, mode);
+	die("Oops", regs, write_access);
 
 	do_exit(SIGKILL);
 }
@@ -153,7 +155,7 @@
 	up(&mm->mmap_sem);
 
 	/* User mode accesses just cause a SIGSEGV */
-	if (mode & FAULT_CODE_USER) {
+	if (user_mode(regs)) {
 		tsk->thread.error_code = mode;
 		tsk->thread.trap_no = 14;
 #ifdef CONFIG_DEBUG_USER
@@ -194,7 +196,7 @@
 	force_sig(SIGBUS, tsk);
 
 	/* Kernel mode? Handle exceptions or die */
-	if (!(mode & FAULT_CODE_USER))
+	if (!user_mode(regs))
 		goto no_context;
 }
 

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