From patchwork Fri Apr 4 06:36:19 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27759 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f70.google.com (mail-pb0-f70.google.com [209.85.160.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 34E3F2036E for ; Fri, 4 Apr 2014 06:44:06 +0000 (UTC) Received: by mail-pb0-f70.google.com with SMTP id rp16sf10840994pbb.9 for ; Thu, 03 Apr 2014 23:44:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=9IG9LJt4o14dBeV6aCN4VB9aGyZUr+zqUVwL+WRFXIY=; b=QQcPYbd1lQ/xxwdZ4cGvPfhjZUOqPAnVRKA/Avm0EzZUneBDmf+nWFiOexqh9pl7AY 9Dc4oxxw0LIH4+Pe22XaFeSAYxUkUbeAWLTNTtNyrXhcSS5rd79hZw1NUHhuMxaKac5m 7DZGsQmmYZIh0EUrdLjdL8U43n7vaMdoaw7LFBpg7m3BKJd4e/m8AVElen5Mi1L/an8W AGNKCBs+6Wf3pUeE2eUnlO0ZZlSNK+MBa7AsuHpLiLeEzlonA/7j/ZNVUNuRGBjxl57K 7J92OBAO+qEPs2vGvB4Z/bBp3GtxAmvwiK2DZuqOFJRL9zW/dO9d5MKgx91Eo45msTLA a33w== X-Gm-Message-State: ALoCoQls0+FjJcG06jDEH+wDB89LxVe1m/UdnI9hBvIwH7hWX+giIVRAJneyG28My/w5t/ecoCvA X-Received: by 10.67.30.197 with SMTP id kg5mr3801629pad.36.1396593845469; Thu, 03 Apr 2014 23:44:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.29.134 with SMTP id b6ls944091qgb.91.gmail; Thu, 03 Apr 2014 23:44:05 -0700 (PDT) X-Received: by 10.221.34.7 with SMTP id sq7mr4289975vcb.5.1396593845361; Thu, 03 Apr 2014 23:44:05 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id ej2si630412veb.95.2014.04.03.23.44.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Apr 2014 23:44:05 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id lg15so2798952vcb.2 for ; Thu, 03 Apr 2014 23:44:05 -0700 (PDT) X-Received: by 10.52.51.197 with SMTP id m5mr9882573vdo.9.1396593845275; Thu, 03 Apr 2014 23:44:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp89376vcv; Thu, 3 Apr 2014 23:44:04 -0700 (PDT) X-Received: by 10.68.197.66 with SMTP id is2mr12956320pbc.96.1396593838798; Thu, 03 Apr 2014 23:43:58 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xs1si4206350pab.32.2014.04.03.23.43.57; Thu, 03 Apr 2014 23:43:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753081AbaDDGnb (ORCPT + 27 others); Fri, 4 Apr 2014 02:43:31 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:60673 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753021AbaDDGnS (ORCPT ); Fri, 4 Apr 2014 02:43:18 -0400 Received: by mail-wi0-f181.google.com with SMTP id hm4so596188wib.8 for ; Thu, 03 Apr 2014 23:43:17 -0700 (PDT) X-Received: by 10.180.211.239 with SMTP id nf15mr1768914wic.9.1396593797586; Thu, 03 Apr 2014 23:43:17 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id be3sm11032466wjc.5.2014.04.03.23.43.14 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 03 Apr 2014 23:43:16 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, fweisbec@gmail.com, linaro-networking@linaro.org, Arvind.Chauhan@arm.com, linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH V2 36/36] timer: don't emulate notifier call to initialize timer base Date: Fri, 4 Apr 2014 12:06:19 +0530 Message-Id: <2ad6493a8e3fb226b5b9dde6a95ed5de53f2a844.1396592516.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In init_timers() we need to call init_timers_cpu() for boot cpu. For this, currently we are emulating a call to hotplug notifier. Probably this was done initially to get rid of code redundancy. But this sequence always called a single routine, i.e. init_timers_cpu(), and so calling that routine directly would be better. This would get rid of emulating a notifier call, few typecasts and the extra steps we are doing in notifier callback. So, this patch calls init_timers_cpu() directly from init_timers(). Signed-off-by: Viresh Kumar --- kernel/timer.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/kernel/timer.c b/kernel/timer.c index 4360edc..d13eb56 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -1666,15 +1666,9 @@ static struct notifier_block timers_nb = { void __init init_timers(void) { - int err; - /* ensure there are enough low bits for flags in timer->base pointer */ BUILD_BUG_ON(__alignof__(struct tvec_base) & TIMER_FLAG_MASK); - - err = timer_cpu_notify(&timers_nb, (unsigned long)CPU_UP_PREPARE, - (void *)(long)smp_processor_id()); - BUG_ON(err != NOTIFY_OK); - + BUG_ON(init_timers_cpu(smp_processor_id())); init_timer_stats(); register_cpu_notifier(&timers_nb); open_softirq(TIMER_SOFTIRQ, run_timer_softirq);