From: James S. <jsi...@us...> - 2001-08-24 18:59:57
|
Update of /cvsroot/linux-mips/linux/arch/mips64/kernel In directory usw-pr-cvs1:/tmp/cvs-serv19394/kernel Modified Files: proc.c ptrace.c unaligned.c Log Message: Synced to Ralph's tree. Index: proc.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips64/kernel/proc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** proc.c 2001/07/09 19:28:47 1.2 --- proc.c 2001/08/24 18:59:54 1.3 *************** *** 4,10 **** * for more details. * ! * Copyright (C) 1995, 1996, 1999 Ralf Baechle ! * ! * XXX Rewrite this mess. */ #include <linux/delay.h> --- 4,9 ---- * for more details. * ! * Copyright (C) 1995, 1996, 1999, 2001 Ralf Baechle ! * Copyright (C) 2001 MIPS Technologies, Inc. */ #include <linux/delay.h> *************** *** 17,21 **** #include <asm/watch.h> ! unsigned long unaligned_instructions; unsigned int vced_count, vcei_count; --- 16,20 ---- #include <asm/watch.h> ! extern unsigned long unaligned_instructions; unsigned int vced_count, vcei_count; Index: ptrace.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips64/kernel/ptrace.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ptrace.c 2001/07/26 16:42:40 1.1 --- ptrace.c 2001/08/24 18:59:54 1.2 *************** *** 63,92 **** if (request == PTRACE_ATTACH) { ! if (child == current) ! goto out_tsk; ! if ((!child->dumpable || ! (current->uid != child->euid) || ! (current->uid != child->suid) || ! (current->uid != child->uid) || ! (current->gid != child->egid) || ! (current->gid != child->sgid) || ! (!cap_issubset(child->cap_permitted, current->cap_permitted)) || ! (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE)) ! goto out_tsk; ! /* the same process cannot be attached many times */ ! if (child->ptrace & PT_PTRACED) ! goto out_tsk; ! child->ptrace |= PT_PTRACED; ! ! write_lock_irq(&tasklist_lock); ! if (child->p_pptr != current) { ! REMOVE_LINKS(child); ! child->p_pptr = current; ! SET_LINKS(child); ! } ! write_unlock_irq(&tasklist_lock); ! ! send_sig(SIGSTOP, child, 1); ! ret = 0; goto out_tsk; } --- 63,67 ---- if (request == PTRACE_ATTACH) { ! ret = ptrace_attach(child); goto out_tsk; } *************** *** 359,388 **** if (request == PTRACE_ATTACH) { ! if (child == current) ! goto out_tsk; ! if ((!child->dumpable || ! (current->uid != child->euid) || ! (current->uid != child->suid) || ! (current->uid != child->uid) || ! (current->gid != child->egid) || ! (current->gid != child->sgid) || ! (!cap_issubset(child->cap_permitted, current->cap_permitted)) || ! (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE)) ! goto out_tsk; ! /* the same process cannot be attached many times */ ! if (child->ptrace & PT_PTRACED) ! goto out_tsk; ! child->ptrace |= PT_PTRACED; ! ! write_lock_irq(&tasklist_lock); ! if (child->p_pptr != current) { ! REMOVE_LINKS(child); ! child->p_pptr = current; ! SET_LINKS(child); ! } ! write_unlock_irq(&tasklist_lock); ! ! send_sig(SIGSTOP, child, 1); ! ret = 0; goto out_tsk; } --- 334,338 ---- if (request == PTRACE_ATTACH) { ! ret = ptrace_attach(child); goto out_tsk; } *************** *** 427,430 **** --- 377,383 ---- case FPR_BASE ... FPR_BASE + 31: if (child->used_math) { + unsigned long long *fregs + = (unsigned long long *) + &child->thread.fpu.hard.fp_regs[0]; #ifndef CONFIG_SMP if (last_task_used_math == child) { Index: unaligned.c =================================================================== RCS file: /cvsroot/linux-mips/linux/arch/mips64/kernel/unaligned.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** unaligned.c 2001/06/22 02:29:32 1.1.1.1 --- unaligned.c 2001/08/24 18:59:54 1.2 *************** *** 73,76 **** --- 73,77 ---- * Undo the partial store in this case. */ + #include <linux/config.h> #include <linux/mm.h> #include <linux/signal.h> *************** *** 379,383 **** --- 380,386 ---- } + #ifdef CONFIG_PROC_FS unsigned long unaligned_instructions; + #endif asmlinkage void do_ade(struct pt_regs *regs) *************** *** 400,404 **** --- 403,409 ---- emulate_load_store_insn(regs, regs->cp0_badvaddr, pc); + #ifdef CONFIG_PROC_FS unaligned_instructions++; + #endif return; |