X-Git-Url: http://git.onelab.eu/?p=linux-2.6.git;a=blobdiff_plain;f=arch%2Fcris%2Fmm%2Ffault.c;h=03254b9eded18153e2670008477be6a10c0ba938;hp=7e8f2a3ee609a136bab9eb49fe5829f065a8687c;hb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;hpb=c449269f45c2cdf53af08c8d0af37472f66539d9 diff --git a/arch/cris/mm/fault.c b/arch/cris/mm/fault.c index 7e8f2a3ee..03254b9ed 100644 --- a/arch/cris/mm/fault.c +++ b/arch/cris/mm/fault.c @@ -6,9 +6,18 @@ * Authors: Bjorn Wesen * * $Log: fault.c,v $ + * Revision 1.11 2004/05/14 07:58:05 starvik + * Merge of changes from 2.4 + * + * Revision 1.10 2003/10/27 14:51:24 starvik + * Removed debugcode + * + * Revision 1.9 2003/10/27 14:50:42 starvik + * Changed do_page_fault signature + * * Revision 1.8 2003/07/04 13:02:48 tobiasa * Moved code snippet from arch/cris/mm/fault.c that searches for fixup code - * to separate function in arch-specific files. + * to seperate function in arch-specific files. * * Revision 1.7 2003/01/22 06:48:38 starvik * Fixed warnings issued by GCC 3.2.1 @@ -95,10 +104,6 @@ extern int find_fixup_code(struct pt_regs *); extern void die_if_kernel(const char *, struct pt_regs *, long); -asmlinkage void do_invalid_op (struct pt_regs *, unsigned long); -asmlinkage void do_page_fault(unsigned long address, struct pt_regs *regs, - int error_code); - /* debug of low-level TLB reload */ #undef DEBUG @@ -134,14 +139,16 @@ volatile pgd_t *current_pgd; asmlinkage void do_page_fault(unsigned long address, struct pt_regs *regs, - int error_code) + int protection, int writeaccess) { struct task_struct *tsk; struct mm_struct *mm; struct vm_area_struct * vma; - int writeaccess; siginfo_t info; + D(printk("Page fault for %X at %X, prot %d write %d\n", + address, regs->erp, protection, writeaccess)); + tsk = current; /* @@ -164,7 +171,7 @@ do_page_fault(unsigned long address, struct pt_regs *regs, */ if (address >= VMALLOC_START && - !(error_code & 1) && + !protection && !user_mode(regs)) goto vmalloc_fault; @@ -172,7 +179,6 @@ do_page_fault(unsigned long address, struct pt_regs *regs, sti(); mm = tsk->mm; - writeaccess = error_code & 2; info.si_code = SEGV_MAPERR; /* @@ -291,7 +297,7 @@ do_page_fault(unsigned long address, struct pt_regs *regs, printk(KERN_ALERT "Unable to handle kernel access"); printk(" at virtual address %08lx\n",address); - die_if_kernel("Oops", regs, error_code); + die_if_kernel("Oops", regs, (writeaccess << 1) | protection); do_exit(SIGKILL);