summaryrefslogtreecommitdiff
path: root/sys/arch/powerpc64
diff options
context:
space:
mode:
authorgkoehler <gkoehler@cvs.openbsd.org>2020-09-01 20:06:50 +0000
committergkoehler <gkoehler@cvs.openbsd.org>2020-09-01 20:06:50 +0000
commita702c889d5ba36bc8af16e146db2f994855a68e8 (patch)
tree194e79ce53e277e50a05ab0459858c3ecac14ff3 /sys/arch/powerpc64
parentc91402e1f0c086bf8aadffc44f5b03e0bacc7ad3 (diff)
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@
Diffstat (limited to 'sys/arch/powerpc64')
-rw-r--r--sys/arch/powerpc64/include/cpu.h7
-rw-r--r--sys/arch/powerpc64/powerpc64/machdep.c13
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