summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_clocksource.c
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2010-09-22 05:32:37 +0000
committermav <mav@FreeBSD.org>2010-09-22 05:32:37 +0000
commit351da3e73cc97345b431bd52a65d6bc21844734b (patch)
tree53f7bdf33b17f42560109ceaa45bb3afea7c2425 /sys/kern/kern_clocksource.c
parentb91310c2821891333dc49aecc345f9f1be3815b2 (diff)
downloadFreeBSD-src-351da3e73cc97345b431bd52a65d6bc21844734b.zip
FreeBSD-src-351da3e73cc97345b431bd52a65d6bc21844734b.tar.gz
If kernel built with DEVICE_POLLING, keep one CPU always in active state
to handle it.
Diffstat (limited to 'sys/kern/kern_clocksource.c')
-rw-r--r--sys/kern/kern_clocksource.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/kern/kern_clocksource.c b/sys/kern/kern_clocksource.c
index e9a7c9d..e654659 100644
--- a/sys/kern/kern_clocksource.c
+++ b/sys/kern/kern_clocksource.c
@@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$");
/* XEN has own timer routines now. */
#ifndef XEN
+#include "opt_device_polling.h"
#include "opt_kdtrace.h"
#include <sys/param.h>
@@ -721,7 +722,11 @@ cpu_idleclock(void)
struct pcpu_state *state;
if (idletick || busy ||
- (periodic && (timer->et_flags & ET_FLAGS_PERCPU)))
+ (periodic && (timer->et_flags & ET_FLAGS_PERCPU))
+#ifdef DEVICE_POLLING
+ || curcpu == CPU_FIRST()
+#endif
+ )
return;
state = DPCPU_PTR(timerstate);
if (periodic)
OpenPOWER on IntegriCloud