diff options
author | 2020-07-01 16:59:00 +0000 | |
---|---|---|
committer | 2020-07-01 16:59:00 +0000 | |
commit | 351f0751d6fb03a52f518b7728ee52a469df5154 (patch) | |
tree | 87c9fa741d75687c172b7d16969be5f3a11ab474 | |
parent | Increase/decrease ci_idepth before/after calling interrupt handlers. (diff) | |
download | wireguard-openbsd-351f0751d6fb03a52f518b7728ee52a469df5154.tar.xz wireguard-openbsd-351f0751d6fb03a52f518b7728ee52a469df5154.zip |
Implement CLKF_INTR, CLKF_USERMODE and CLKF_PC.
-rw-r--r-- | sys/arch/powerpc64/include/cpu.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/powerpc64/include/cpu.h b/sys/arch/powerpc64/include/cpu.h index 8ba1280d26c..4396b1ec8b3 100644 --- a/sys/arch/powerpc64/include/cpu.h +++ b/sys/arch/powerpc64/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.16 2020/06/22 16:58:20 kettenis Exp $ */ +/* $OpenBSD: cpu.h,v 1.17 2020/07/01 16:59:00 kettenis Exp $ */ /* * Copyright (c) 2020 Mark Kettenis <kettenis@openbsd.org> @@ -83,9 +83,11 @@ register struct cpu_info *__curcpu asm("r13"); for (cii = 0, ci = curcpu(); ci != NULL; ci = NULL) #define cpu_number() 0 -#define CLKF_INTR(frame) 0 -#define CLKF_USERMODE(frame) 0 -#define CLKF_PC(frame) 0 +#define clockframe trapframe + +#define CLKF_INTR(frame) (curcpu()->ci_idepth > 1) +#define CLKF_USERMODE(frame) (frame->srr1 & PSL_PR) +#define CLKF_PC(frame) (frame->srr0) #define aston(p) ((p)->p_md.md_astpending = 1) #define need_proftick(p) aston(p) |