diff options
| author | 2013-06-30 17:04:46 +0000 | |
|---|---|---|
| committer | 2013-06-30 17:04:46 +0000 | |
| commit | 1bf465fe84cbe06483d68d17744a264ac3172000 (patch) | |
| tree | 6d8ad4f73fef88f093938f3be10ff2b7c6d0742c | |
| parent | Add a luna88k-specific function to initialize the instruction cmmu (diff) | |
| download | wireguard-openbsd-1bf465fe84cbe06483d68d17744a264ac3172000.tar.xz wireguard-openbsd-1bf465fe84cbe06483d68d17744a264ac3172000.zip | |
Shortly run at ipl 1 in cpu_idle_cycle(), to let SIMH recognize the system
is idle; adapted from NetBSD
| -rw-r--r-- | sys/arch/vax/include/cpu.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sys/arch/vax/include/cpu.h b/sys/arch/vax/include/cpu.h index 6284fd9e230..2f0d237bc1c 100644 --- a/sys/arch/vax/include/cpu.h +++ b/sys/arch/vax/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.45 2013/03/12 09:37:16 mpi Exp $ */ +/* $OpenBSD: cpu.h,v 1.46 2013/06/30 17:04:46 miod Exp $ */ /* $NetBSD: cpu.h,v 1.41 1999/10/21 20:01:36 ragge Exp $ */ /* @@ -134,9 +134,17 @@ extern int want_resched; /* resched() was called */ */ #define need_proftick(p) mtpr(AST_OK,PR_ASTLVL) +/* + * Temporarily switching to ipl 1 when the kernel is idle allows SIMH + * to recognize the system is idle, and relinquish CPU time as well. + */ #define cpu_idle_enter() do { /* nothing */ } while (0) -#define cpu_idle_cycle() do { /* nothing */ } while (0) #define cpu_idle_leave() do { /* nothing */ } while (0) +#define cpu_idle_cycle() \ +do { \ + mtpr(0x01, PR_IPL); \ + mtpr(0x00, PR_IPL); \ +} while (0) /* * This defines the I/O device register space size in pages. |
