From 123f4b6634c6f64980c8a879dc8140fcc706d6d2 Mon Sep 17 00:00:00 2001 From: Masao Uebayashi Date: Fri, 11 Jul 2014 10:53:08 +0000 Subject: 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@ --- sys/arch/hppa/include/cpu.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sys/arch/hppa/include/cpu.h') diff --git a/sys/arch/hppa/include/cpu.h b/sys/arch/hppa/include/cpu.h index 8a90d0b4485..4465a874c92 100644 --- a/sys/arch/hppa/include/cpu.h +++ b/sys/arch/hppa/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.86 2013/03/31 17:07:03 deraadt Exp $ */ +/* $OpenBSD: cpu.h,v 1.87 2014/07/11 10:53:07 uebayasi Exp $ */ /* * Copyright (c) 2000-2004 Michael Shalayeff @@ -140,6 +140,8 @@ curcpu(void) #define CPU_INFO_FOREACH(cii, ci) \ for (cii = 0, ci = &cpu_info[0]; cii < ncpus; cii++, ci++) +#define CPU_BUSY_CYCLE() do {} while (0) + /* types */ enum hppa_cpu_type { hpcxs, hpcxt, hpcxta, hpcxl, hpcxl2, hpcxu, hpcxu2, hpcxw -- cgit v1.2.3