From patchwork Wed Jun 1 08:53:06 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 837412 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p518rO48031218 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 1 Jun 2011 08:53:45 GMT Received: from canuck.infradead.org ([134.117.69.58]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QRhAu-00066d-Sb; Wed, 01 Jun 2011 08:53:13 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QRhAu-000484-Ll; Wed, 01 Jun 2011 08:53:12 +0000 Received: from mail-iy0-f177.google.com ([209.85.210.177]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QRhAr-00047l-3o for linux-arm-kernel@lists.infradead.org; Wed, 01 Jun 2011 08:53:09 +0000 Received: by iyb39 with SMTP id 39so5636270iyb.36 for ; Wed, 01 Jun 2011 01:53:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=I0ltc1QoGH/bci8hTOVfUiXyy8qLMejfTDSUDBIXxzM=; b=odcj9ZmzxcVHZXaErzt8jf6+Gy7wHvFICyxvRjYt5NM9h9V5682o6n5tzheFQBGbjZ eNN9JKJ9ZPTL1MtInCHq0LvRkjNmqk9+8bljuVrrwuFZaZGrv/2O1QfY9j61JuSHq5aN t8M8Uqz3lVY6Nx8GKMd+g5B+T9EaO8kgSkR5E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=hu7dSdEh0kYERbAEmcCQQeG5yL34AWfQ7xIuv42/uc9i1TsmenprZzz8LHgsylQnRS wXx6V2DJu+S/wvTmhZ+VLl+ZbE/gHQHjo+Xmsq+mDnFzTJJkeiD2e3bkvZWKmOQJbLEh E7nwMruVkq0O1JSt9GE2/GLi0RIO6LLsQXV6I= MIME-Version: 1.0 Received: by 10.231.176.168 with SMTP id be40mr6673780ibb.1.1306918386916; Wed, 01 Jun 2011 01:53:06 -0700 (PDT) Received: by 10.231.12.133 with HTTP; Wed, 1 Jun 2011 01:53:06 -0700 (PDT) In-Reply-To: References: <1306876145-6778-1-git-send-email-linus.walleij@stericsson.com> Date: Wed, 1 Jun 2011 10:53:06 +0200 X-Google-Sender-Auth: lvkssk66F1LAoBH7W72zB2mnAdU Message-ID: Subject: Re: [PATCH 3/3] mach-u300: cleanup clockevent code From: Linus Walleij To: Thomas Gleixner X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110601_045309_430742_24B0D366 X-CRM114-Status: GOOD ( 15.43 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.210.177 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is freemail (linus.ml.walleij[at]gmail.com) 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 RFC_ABUSE_POST Both abuse and postmaster missing on sender domain Cc: Lee Jones , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 01 Jun 2011 08:53:45 +0000 (UTC) 2011/6/1 Thomas Gleixner : > We need it even on UP for the &!^%$@ broadcast mechanism to avoid a > massive ifdef mess there :( > > But yeah, we can make it conditional for SMP and simply set > cpumask_of(0) in the UP case. Like this? From e5d452d12c510a237c608175ecf0c8218210080f Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Wed, 1 Jun 2011 10:49:43 +0200 Subject: [PATCH] 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. Signed-off-by: Linus Walleij --- 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);