diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2009-12-29 13:11:41 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2009-12-29 13:11:41 +0000 |
commit | 049fc13d355604630c9f405a90c3a9bde13458ab (patch) | |
tree | f1111edbfc0a88e866c7f9ac7461f259e1d08c3f /sys/arch | |
parent | 7bd69d02efad3963054ca51b27760a6e34a48b82 (diff) |
Move hppa to per process AST.
ok kettenis@ miod@
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/hppa/hppa/trap.c | 8 | ||||
-rw-r--r-- | sys/arch/hppa/include/cpu.h | 13 | ||||
-rw-r--r-- | sys/arch/hppa/include/intr.h | 5 | ||||
-rw-r--r-- | sys/arch/hppa/include/proc.h | 5 |
4 files changed, 18 insertions, 13 deletions
diff --git a/sys/arch/hppa/hppa/trap.c b/sys/arch/hppa/hppa/trap.c index 78244426286..80136774f26 100644 --- a/sys/arch/hppa/hppa/trap.c +++ b/sys/arch/hppa/hppa/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.101 2009/02/04 17:23:18 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.102 2009/12/29 13:11:40 jsing Exp $ */ /* * Copyright (c) 1998-2004 Michael Shalayeff @@ -93,7 +93,7 @@ const char *trap_type[] = { }; int trap_types = sizeof(trap_type)/sizeof(trap_type[0]); -int want_resched, astpending; +int want_resched; #define frame_regmap(tf,r) (((u_int *)(tf))[hppa_regmap[(r)]]) u_char hppa_regmap[32] = { @@ -136,8 +136,8 @@ userret(struct proc *p) { int sig; - if (astpending) { - astpending = 0; + if (p->p_md.md_astpending) { + p->p_md.md_astpending = 0; uvmexp.softs++; if (p->p_flag & P_OWEUPC) { ADDUPROF(p); diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h index fa72e7b52ea..3aef944489b 100644 --- a/sys/arch/hppa/include/cpu.h +++ b/sys/arch/hppa/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.60 2009/02/01 14:53:04 miod Exp $ */ +/* $OpenBSD: cpu.h,v 1.61 2009/12/29 13:11:40 jsing Exp $ */ /* * Copyright (c) 2000-2004 Michael Shalayeff @@ -153,10 +153,15 @@ extern register_t kpsw; #define CLKF_USERMODE(framep) ((framep)->tf_flags & T_USER) #define CLKF_SYSCALL(framep) ((framep)->tf_flags & TFF_SYS) -#define signotify(p) (setsoftast()) -#define need_resched(ci) (want_resched = 1, setsoftast()) +#define signotify(p) setsoftast(p) +#define need_resched(ci) \ + do { \ + want_resched = 1; \ + if ((ci)->ci_curproc != NULL) \ + setsoftast((ci)->ci_curproc); \ + } while (0) #define clear_resched(ci) want_resched = 0 -#define need_proftick(p) setsoftast() +#define need_proftick(p) setsoftast(p) #define PROC_PC(p) ((p)->p_md.md_regs->tf_iioq_head) #ifndef _LOCORE diff --git a/sys/arch/hppa/include/intr.h b/sys/arch/hppa/include/intr.h index 74efdabd14b..7321850ea8d 100644 --- a/sys/arch/hppa/include/intr.h +++ b/sys/arch/hppa/include/intr.h @@ -1,4 +1,4 @@ -/* $OpenBSD: intr.h,v 1.25 2009/03/15 19:40:40 miod Exp $ */ +/* $OpenBSD: intr.h,v 1.26 2009/12/29 13:11:40 jsing Exp $ */ /* * Copyright (c) 2002-2004 Michael Shalayeff @@ -59,7 +59,6 @@ extern volatile int cpl; extern volatile u_long ipending, imask[NIPL]; -extern int astpending; #ifdef DIAGNOSTIC void splassert_fail(int, int, const char *); @@ -126,7 +125,7 @@ splx(int ncpl) #define SOFTINT_MASK ((1 << (IPL_SOFTCLOCK - 1)) | \ (1 << (IPL_SOFTNET - 1)) | (1 << (IPL_SOFTTTY - 1))) -#define setsoftast() (astpending = 1) +#define setsoftast(p) (p->p_md.md_astpending = 1) #define setsoftnet() softintr(1 << (IPL_SOFTNET - 1)) void *softintr_establish(int, void (*)(void *), void *); diff --git a/sys/arch/hppa/include/proc.h b/sys/arch/hppa/include/proc.h index 41df3eb8a3a..ff5e79338eb 100644 --- a/sys/arch/hppa/include/proc.h +++ b/sys/arch/hppa/include/proc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: proc.h,v 1.3 2005/05/26 04:34:52 kettenis Exp $ */ +/* $OpenBSD: proc.h,v 1.4 2009/12/29 13:11:40 jsing Exp $ */ /* * Copyright (c) 1992, 1993 @@ -35,7 +35,8 @@ * Machine-dependent part of the proc structure for hppa. */ struct mdproc { - struct trapframe *md_regs; /* registers on current frame */ + struct trapframe *md_regs; /* registers on current frame */ + volatile int md_astpending; /* AST pending for this process */ int md_flags; /* machine-dependent flags */ vaddr_t md_bpva; |