diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2004-05-20 09:20:43 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2004-05-20 09:20:43 +0000 |
commit | fa548ed2239322fed4b99e17ca368c836285328c (patch) | |
tree | 55aab0ddc31aa2e7f0a93ce13b8a59cf28fccc84 /sys/arch/hp300 | |
parent | bb1fe1b9b98659e5bb936357bf26eda5391543bf (diff) |
Properly flush instruction cache for ptrace(PT_WRTIE_{DI}, ...) on powerpc
and m68k.
ok drahn@, millert@
Diffstat (limited to 'sys/arch/hp300')
-rw-r--r-- | sys/arch/hp300/hp300/locore.s | 5 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/sys_machdep.c | 9 | ||||
-rw-r--r-- | sys/arch/hp300/include/cpu.h | 4 |
3 files changed, 10 insertions, 8 deletions
diff --git a/sys/arch/hp300/hp300/locore.s b/sys/arch/hp300/hp300/locore.s index e24ec1f81bc..6a937a1049f 100644 --- a/sys/arch/hp300/hp300/locore.s +++ b/sys/arch/hp300/hp300/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.38 2004/03/09 00:08:13 xsa Exp $ */ +/* $OpenBSD: locore.s,v 1.39 2004/05/20 09:20:41 kettenis Exp $ */ /* $NetBSD: locore.s,v 1.91 1998/11/11 06:41:25 thorpej Exp $ */ /* @@ -879,8 +879,9 @@ ENTRY_NOPROFILE(trap12) movl d1,sp@- | push length movl a1,sp@- | push addr movl d0,sp@- | push command + movl _C_LABEL(curproc),sp@- | push proc pointer jbsr _C_LABEL(cachectl) | do it - lea sp@(12),sp | pop args + lea sp@(16),sp | pop args jra _ASM_LABEL(rei) | all done /* diff --git a/sys/arch/hp300/hp300/sys_machdep.c b/sys/arch/hp300/hp300/sys_machdep.c index e1384e3fb0d..37820ce9368 100644 --- a/sys/arch/hp300/hp300/sys_machdep.c +++ b/sys/arch/hp300/hp300/sys_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_machdep.c,v 1.12 2003/06/02 23:27:45 millert Exp $ */ +/* $OpenBSD: sys_machdep.c,v 1.13 2004/05/20 09:20:41 kettenis Exp $ */ /* $NetBSD: sys_machdep.c,v 1.17 1997/05/19 10:15:00 veego Exp $ */ /* @@ -70,7 +70,8 @@ */ /*ARGSUSED1*/ int -cachectl(req, addr, len) +cachectl(p, req, addr, len) + struct proc *p; int req; vaddr_t addr; int len; @@ -86,7 +87,7 @@ cachectl(req, addr, len) #ifdef COMPAT_HPUX extern struct emul emul_hpux; - if ((curproc->p_emul == &emul_hpux) && + if ((p->p_emul == &emul_hpux) && len != 16 && len != NBPG) doall = 1; #endif @@ -114,7 +115,7 @@ cachectl(req, addr, len) if (!doall && (pa == 0 || ((int)addr & PGOFSET) == 0)) { if (pmap_extract( - curproc->p_vmspace->vm_map.pmap, + p->p_vmspace->vm_map.pmap, addr, &pa) == FALSE) doall = 1; } diff --git a/sys/arch/hp300/include/cpu.h b/sys/arch/hp300/include/cpu.h index 4abb9721d78..b304d633999 100644 --- a/sys/arch/hp300/include/cpu.h +++ b/sys/arch/hp300/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.22 2003/06/02 23:27:45 millert Exp $ */ +/* $OpenBSD: cpu.h,v 1.23 2004/05/20 09:20:41 kettenis Exp $ */ /* $NetBSD: cpu.h,v 1.28 1998/02/13 07:41:51 scottr Exp $ */ /* @@ -180,7 +180,7 @@ int badbaddr(caddr_t); void dumpconf(void); /* sys_machdep.c functions */ -int cachectl(int, vaddr_t, int); +int cachectl(struct proc *, int, vaddr_t, int); /* vm_machdep.c functions */ void physaccess(caddr_t, caddr_t, int, int); |