Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/arch/sh3/sh3/sh3_machdep.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/arch/sh3/sh3/sh3_machdep.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.86.2.1 retrieving revision 1.87 diff -u -p -r1.86.2.1 -r1.87 --- src/sys/arch/sh3/sh3/sh3_machdep.c 2011/03/05 20:51:58 1.86.2.1 +++ src/sys/arch/sh3/sh3/sh3_machdep.c 2010/11/06 11:46:02 1.87 @@ -1,4 +1,4 @@ -/* $NetBSD: sh3_machdep.c,v 1.86.2.1 2011/03/05 20:51:58 rmind Exp $ */ +/* $NetBSD: sh3_machdep.c,v 1.87 2010/11/06 11:46:02 uebayasi Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2002 The NetBSD Foundation, Inc. @@ -65,13 +65,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sh3_machdep.c,v 1.86.2.1 2011/03/05 20:51:58 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sh3_machdep.c,v 1.87 2010/11/06 11:46:02 uebayasi Exp $"); -#include "opt_ddb.h" #include "opt_kgdb.h" #include "opt_memsize.h" #include "opt_kstack_debug.h" -#include "opt_ptrace.h" #include #include @@ -88,7 +86,6 @@ __KERNEL_RCSID(0, "$NetBSD: sh3_machdep. #include #include #include -#include #ifdef KGDB #include @@ -105,9 +102,7 @@ const char kgdb_devname[] = KGDB_DEVNAME #include #include #include -#include #include -#include /* Our exported CPU info; we can have only one. */ struct cpu_info cpu_info_store; @@ -194,33 +189,6 @@ sh_cpu_init(int arch, int product) /* Set page size (4KB) */ uvm_setpagesize(); - - /* setup UBC channel A for single-stepping */ -#if defined(PTRACE) || defined(DDB) - _reg_write_2(SH_(BBRA), 0); /* disable channel A */ - _reg_write_2(SH_(BBRB), 0); /* disable channel B */ - -#ifdef SH3 - if (CPU_IS_SH3) { - /* A: break after execution, ignore ASID */ - _reg_write_4(SH3_BRCR, (UBC_CTL_A_AFTER_INSN - | SH3_UBC_CTL_A_MASK_ASID)); - - /* A: compare all address bits */ - _reg_write_4(SH3_BAMRA, 0x00000000); - } -#endif /* SH3 */ - -#ifdef SH4 - if (CPU_IS_SH4) { - /* A: break after execution */ - _reg_write_2(SH4_BRCR, UBC_CTL_A_AFTER_INSN); - - /* A: compare all address bits, ignore ASID */ - _reg_write_1(SH4_BAMRA, SH4_UBC_MASK_NONE | SH4_UBC_MASK_ASID); - } -#endif /* SH4 */ -#endif } @@ -515,8 +483,6 @@ cpu_setmcontext(struct lwp *l, const mco tf->tf_r1 = gr[_REG_R1]; tf->tf_r0 = gr[_REG_R0]; tf->tf_r15 = gr[_REG_R15]; - - lwp_setprivate(l, (void *)(uintptr_t)gr[_REG_GBR]); } #if 0 @@ -544,7 +510,7 @@ setregs(struct lwp *l, struct exec_packa { struct trapframe *tf; - l->l_md.md_flags &= ~(MDP_USEDFPU | MDP_SSTEP); + l->l_md.md_flags &= ~MDP_USEDFPU; tf = l->l_md.md_regs; @@ -565,7 +531,7 @@ setregs(struct lwp *l, struct exec_packa tf->tf_r6 = stack + 4 * tf->tf_r4 + 8; /* envp */ tf->tf_r7 = 0; tf->tf_r8 = 0; - tf->tf_r9 = l->l_proc->p_psstrp; + tf->tf_r9 = (int)l->l_proc->p_psstr; tf->tf_r10 = 0; tf->tf_r11 = 0; tf->tf_r12 = 0; @@ -589,11 +555,3 @@ cpu_reset(void) #endif /* NOTREACHED */ } - -int -cpu_lwp_setprivate(lwp_t *l, void *addr) -{ - - l->l_md.md_regs->tf_gbr = (int)addr; - return 0; -}