summaryrefslogtreecommitdiff
path: root/sys/arch/mips64/include/cpu.h
diff options
context:
space:
mode:
authorVisa Hankala <visa@cvs.openbsd.org>2017-05-24 13:33:01 +0000
committerVisa Hankala <visa@cvs.openbsd.org>2017-05-24 13:33:01 +0000
commit41d468b9e505cc0805b5cdff947859554896fe8c (patch)
treedbb8443ace184562a58990021a3c03e71c6c88e1 /sys/arch/mips64/include/cpu.h
parent3d5d9c3cc643a0562be079f11040d4bc73984726 (diff)
Add an idle cycle implementation for R4600/R5000/RM7000 CPUs and their
derivatives. This lets the kernel utilize the CPUs' Standby Mode to reduce the power consumption of an idle system. Suggested by and input from miod@. He also tested this patch on an RM7000 O2.
Diffstat (limited to 'sys/arch/mips64/include/cpu.h')
-rw-r--r--sys/arch/mips64/include/cpu.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/mips64/include/cpu.h b/sys/arch/mips64/include/cpu.h
index 5213837ace9..260e8585361 100644
--- a/sys/arch/mips64/include/cpu.h
+++ b/sys/arch/mips64/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.116 2017/04/20 15:42:26 visa Exp $ */
+/* $OpenBSD: cpu.h,v 1.117 2017/05/24 13:33:00 visa Exp $ */
/*-
* Copyright (c) 1992, 1993
@@ -234,6 +234,9 @@ extern struct cpu_info *cpu_info_list;
#define CPU_INFO_UNIT(ci) ((ci)->ci_dev ? (ci)->ci_dev->dv_unit : 0)
+extern void (*cpu_idle_cycle_func)(void);
+#define cpu_idle_cycle() (*cpu_idle_cycle_func)()
+
#ifdef MULTIPROCESSOR
#define MAXCPUS 4
#define getcurcpu() hw_getcurcpu()