linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linus.walleij@linaro.org (Linus Walleij)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clockevents: make register functions work on UP
Date: Wed, 1 Jun 2011 10:49:43 +0200	[thread overview]
Message-ID: <mailman.0.1306918392.5904.linux-arm-kernel@lists.infradead.org> (raw)

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.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 kernel/time/clockevents.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c
index c027d4f..aa664f4 100644
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -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);

-- 
1.7.3.2

Yours,
Linus Walleij

                 reply	other threads:[~2011-06-01  8:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mailman.0.1306918392.5904.linux-arm-kernel@lists.infradead.org \
    --to=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).