Commit-ID: 1b054b67d3bfc6dca9f634c104780f3f24ff3eec Gitweb: http://git.kernel.org/tip/1b054b67d3bfc6dca9f634c104780f3f24ff3eec Author: Thomas Gleixner <tglx@xxxxxxxxxxxxx> AuthorDate: Fri, 3 Jun 2011 11:13:33 +0200 Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx> CommitDate: Fri, 3 Jun 2011 11:13:33 +0200 clockevents: Handle empty cpumask gracefully For UP it's stupid to request an initialized cpumask for the clock event devices. Though we need the mask set even on UP to avoid a horrible ifdeffery especially in the broadcast code. For SMP we can at least try to survive with a warning and set the cpumask of the cpu we're running on. That gives a decent chance to bring the machine up and retrieve the debug info. Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Linus Walleij <linus.walleij@xxxxxxxxxx Cc: Lee Jones <lee.jones@xxxxxxxxxx> Cc: Russell King - ARM Linux <linux@xxxxxxxxxxxxxxxx> Cc: Stephen Boyd <sboyd@xxxxxxxxxxxxxx> --- kernel/time/clockevents.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index c027d4f..e4c699d 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c @@ -182,7 +182,10 @@ void clockevents_register_device(struct clock_event_device *dev) unsigned long flags; BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED); - BUG_ON(!dev->cpumask); + if (!dev->cpumask) { + WARN_ON(num_possible_cpus() > 1); + dev->cpumask = cpumask_of(smp_processor_id()); + } raw_spin_lock_irqsave(&clockevents_lock, flags); -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html