Skip to contentSkip to conversation

clockevents: make register functions work on UP

PATCH New Linus Walleij 1 participant 1 message Jun 1, 2011 High-resolution timers, timer wheel, clockevents

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clockevents: make register functions work on UP

On UP systems the clkevt->cpumask is not required, and so as to avoid ifdef:ing it out of the struct on UP, we remove the mask warning on UP and force the mask to CPU0 for consistency.

---
 kernel/time/clockevents.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
kernel/time/clockevents.c +0 -0
index c027d4f..aa664f4 100644
@@ -182,7 +182,11 @@ void clockevents_register_device(struct

clock_event_device *dev)
unsigned long flags;

BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED);
+#ifdef CONFIG_SMP
BUG_ON(!dev->cpumask);
+#else
+ dev->cpumask = cpumask_of(0);
+#endif

raw_spin_lock_irqsave(&clockevents_lock, flags);

Signature · 4 lines
1.7.3.2

Yours,
Linus Walleij