summaryrefslogtreecommitdiff
path: root/sys/arch/arm/include
diff options
context:
space:
mode:
authorMasao Uebayashi <uebayasi@cvs.openbsd.org>2014-07-11 10:53:08 +0000
committerMasao Uebayashi <uebayasi@cvs.openbsd.org>2014-07-11 10:53:08 +0000
commit123f4b6634c6f64980c8a879dc8140fcc706d6d2 (patch)
tree8f16526685cec43a88ad22499b7316fe46507593 /sys/arch/arm/include
parent7153f32429c8f459cac9dbed87a626718d2b84b9 (diff)
CPU_BUSY_CYCLE(): A new MI statement for busy loop power reduction
The new CPU_BUSY_CYCLE() may be put in a busy loop body so that CPU can reduce power consumption, as Linux's cpu_relax() and FreeBSD's cpu_spinwait(). To start minimally, use PAUSE on i386/amd64 and empty on others. The name is chosen following the existing cpu_idle_*() functions. Naming and API may be polished later. OK kettenis@
Diffstat (limited to 'sys/arch/arm/include')
-rw-r--r--sys/arch/arm/include/cpu.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arch/arm/include/cpu.h b/sys/arch/arm/include/cpu.h
index a75285cd8fc..f00363cac0c 100644
--- a/sys/arch/arm/include/cpu.h
+++ b/sys/arch/arm/include/cpu.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: cpu.h,v 1.38 2013/09/12 11:43:51 patrick Exp $ */
+/* $OpenBSD: cpu.h,v 1.39 2014/07/11 10:53:07 uebayasi Exp $ */
/* $NetBSD: cpu.h,v 1.34 2003/06/23 11:01:08 martin Exp $ */
/*
@@ -234,6 +234,8 @@ extern struct cpu_info *cpu_info[MAXCPUS];
void cpu_boot_secondary_processors(void);
#endif /* !MULTIPROCESSOR */
+#define CPU_BUSY_CYCLE() do {} while (0)
+
#define curpcb curcpu()->ci_curpcb
/*