diff options
author | 2020-09-01 20:06:49 +0000 | |
---|---|---|
committer | 2020-09-01 20:06:49 +0000 | |
commit | 9ae0232da226e60ad78bddabe99d2db6a37c378f (patch) | |
tree | 9004f167696a0ff537fe355171d9f9e4f8d328db | |
parent | zap nasty whitespace (diff) | |
download | wireguard-openbsd-9ae0232da226e60ad78bddabe99d2db6a37c378f.tar.xz wireguard-openbsd-9ae0232da226e60ad78bddabe99d2db6a37c378f.zip |
Fix signotify() for powerpc64 bsd.mp
Copy signotify() from amd64, so that if proc *p is on another cpu, then
signotify(p) notifies the correct cpu.
ok kettenis@
-rw-r--r-- | sys/arch/powerpc64/include/cpu.h | 7 | ||||
-rw-r--r-- | sys/arch/powerpc64/powerpc64/machdep.c | 13 |
2 files changed, 15 insertions, 5 deletions
diff --git a/sys/arch/powerpc64/include/cpu.h b/sys/arch/powerpc64/include/cpu.h index 2c716378f66..2fbf638ba3f 100644 --- a/sys/arch/powerpc64/include/cpu.h +++ b/sys/arch/powerpc64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.24 2020/08/23 10:07:51 kettenis Exp $ */ +/* $OpenBSD: cpu.h,v 1.25 2020/09/01 20:06:49 gkoehler Exp $ */ /* * Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org> @@ -154,9 +154,10 @@ void cpu_startclock(void); #define aston(p) ((p)->p_md.md_astpending = 1) #define need_proftick(p) aston(p) +void signotify(struct proc *); + #define cpu_unidle(ci) #define CPU_BUSY_CYCLE() do {} while (0) -#define signotify(p) setsoftast() #define curpcb curcpu()->ci_curpcb @@ -184,8 +185,6 @@ void need_resched(struct cpu_info *); void delay(u_int); #define DELAY(x) delay(x) -#define setsoftast() aston(curcpu()->ci_curproc) - #define PROC_STACK(p) ((p)->p_md.md_regs->fixreg[1]) #define PROC_PC(p) ((p)->p_md.md_regs->srr0) diff --git a/sys/arch/powerpc64/powerpc64/machdep.c b/sys/arch/powerpc64/powerpc64/machdep.c index 58f894c7a0d..c4635cb6a9e 100644 --- a/sys/arch/powerpc64/powerpc64/machdep.c +++ b/sys/arch/powerpc64/powerpc64/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.58 2020/08/25 17:49:58 kettenis Exp $ */ +/* $OpenBSD: machdep.c,v 1.59 2020/09/01 20:06:49 gkoehler Exp $ */ /* * Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org> @@ -874,6 +874,17 @@ sys_sigreturn(struct proc *p, void *v, register_t *retval) return EJUSTRETURN; } +/* + * Notify the current process (p) that it has a signal pending, + * process as soon as possible. + */ +void +signotify(struct proc *p) +{ + aston(p); + cpu_kick(p->p_cpu); +} + void cpu_switchto_asm(struct proc *, struct proc *); void |