diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/macppc/macppc/genassym.cf | 4 | ||||
-rw-r--r-- | sys/arch/macppc/macppc/locore.S | 8 | ||||
-rw-r--r-- | sys/arch/powerpc/include/cpu.h | 10 | ||||
-rw-r--r-- | sys/arch/powerpc/include/proc.h | 3 | ||||
-rw-r--r-- | sys/arch/powerpc/powerpc/trap.c | 4 |
5 files changed, 16 insertions, 13 deletions
diff --git a/sys/arch/macppc/macppc/genassym.cf b/sys/arch/macppc/macppc/genassym.cf index 9e1f850e0e5..78f4defa294 100644 --- a/sys/arch/macppc/macppc/genassym.cf +++ b/sys/arch/macppc/macppc/genassym.cf @@ -1,4 +1,4 @@ -# $OpenBSD: genassym.cf,v 1.16 2007/12/04 22:36:39 kettenis Exp $ +# $OpenBSD: genassym.cf,v 1.17 2008/04/27 15:59:49 drahn Exp $ # # Copyright (c) 1982, 1990 The Regents of the University of California. # All rights reserved. @@ -72,6 +72,7 @@ struct proc member p_addr member p_stat member p_cpu +member P_MD_ASTPENDING p_md.md_astpending struct sigframe member sf_sc @@ -84,7 +85,6 @@ struct cpu_info member ci_curproc member ci_curpcb member ci_curpm -member ci_astpending member ci_want_resched member ci_cpl member ci_intrdepth diff --git a/sys/arch/macppc/macppc/locore.S b/sys/arch/macppc/macppc/locore.S index ab873201e58..a70c8d1e14f 100644 --- a/sys/arch/macppc/macppc/locore.S +++ b/sys/arch/macppc/macppc/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.37 2008/04/26 22:37:41 drahn Exp $ */ +/* $OpenBSD: locore.S,v 1.38 2008/04/27 15:59:49 drahn Exp $ */ /* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */ /* @@ -920,7 +920,8 @@ trapexit: mtcr %r5 bc 4,17,1f /* branch if PSL_PR is false */ GET_CPUINFO(%r3) - lwz %r4,CI_ASTPENDING(%r3) + lwz %r4,CI_CURPROC(%r3) + lwz %r4,P_MD_ASTPENDING(%r4) andi. %r4,%r4,1 beq 1f li %r6,EXC_AST @@ -1151,7 +1152,8 @@ intr_exit: lwz %r4,52(3); mtsr 13,%r4; lwz %r4,56(3); mtsr 14,%r4; lwz %r4,60(3); mtsr 15,%r4; - lwz %r4,CI_ASTPENDING(%r5) /* Test AST pending */ + lwz %r4,CI_CURPROC(%r5) + lwz %r4,P_MD_ASTPENDING(%r4) /* Test AST pending */ andi. %r4,%r4,1 beq 1f /* Setup for entry to realtrap: */ diff --git a/sys/arch/powerpc/include/cpu.h b/sys/arch/powerpc/include/cpu.h index 5a270eca04f..c411eb7c777 100644 --- a/sys/arch/powerpc/include/cpu.h +++ b/sys/arch/powerpc/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.33 2008/04/26 22:37:41 drahn Exp $ */ +/* $OpenBSD: cpu.h,v 1.34 2008/04/27 15:59:49 drahn Exp $ */ /* $NetBSD: cpu.h,v 1.1 1996/09/30 16:34:21 ws Exp $ */ /* @@ -52,7 +52,6 @@ struct cpu_info { struct proc *ci_vecproc; int ci_cpuid; - volatile int ci_astpending; volatile int ci_want_resched; volatile int ci_cpl; volatile int ci_iactive; @@ -138,9 +137,10 @@ extern struct cpu_info cpu_info[PPC_MAXPROCS]; void delay(unsigned); #define DELAY(n) delay(n) -#define need_resched(ci) (ci->ci_want_resched = 1, ci->ci_astpending = 1) -#define need_proftick(p) do { curcpu()->ci_astpending = 1; } while (0) -#define signotify(p) (curcpu()->ci_astpending = 1) +#define need_resched(ci) (ci->ci_want_resched = 1, \ + ci->ci_curproc->p_md.md_astpending = 1) +#define need_proftick(p) do { p->p_md.md_astpending = 1; } while (0) +#define signotify(p) (p->p_md.md_astpending = 1) extern char *bootpath; diff --git a/sys/arch/powerpc/include/proc.h b/sys/arch/powerpc/include/proc.h index dad0ab7bba2..62243a07983 100644 --- a/sys/arch/powerpc/include/proc.h +++ b/sys/arch/powerpc/include/proc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.h,v 1.4 2006/04/17 20:44:43 miod Exp $ */ +/* $OpenBSD: proc.h,v 1.5 2008/04/27 15:59:49 drahn Exp $ */ /* $NetBSD: proc.h,v 1.1 1996/09/30 16:34:31 ws Exp $ */ /*- @@ -39,6 +39,7 @@ * Machine-dependent part of the proc structure */ struct mdproc { + __volatile int md_astpending; }; #endif /* _POWERPC_PROC_H_ */ diff --git a/sys/arch/powerpc/powerpc/trap.c b/sys/arch/powerpc/powerpc/trap.c index 2b1694924b2..b418ccc42ed 100644 --- a/sys/arch/powerpc/powerpc/trap.c +++ b/sys/arch/powerpc/powerpc/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.79 2007/10/27 22:31:17 kettenis Exp $ */ +/* $OpenBSD: trap.c,v 1.80 2008/04/27 15:59:49 drahn Exp $ */ /* $NetBSD: trap.c,v 1.3 1996/10/13 03:31:37 christos Exp $ */ /* @@ -662,7 +662,7 @@ for (i = 0; i < errnum; i++) { case EXC_AST|EXC_USER: uvmexp.softs++; - ci->ci_astpending = 0; /* we are about to do it */ + p->p_md.md_astpending = 0; /* we are about to do it */ if (p->p_flag & P_OWEUPC) { KERNEL_PROC_LOCK(p); ADDUPROF(p); |