From patchwork Wed Mar 26 11:21:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27108 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vc0-f200.google.com (mail-vc0-f200.google.com [209.85.220.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 652A220369 for ; Wed, 26 Mar 2014 11:23:32 +0000 (UTC) Received: by mail-vc0-f200.google.com with SMTP id lg15sf4243442vcb.3 for ; Wed, 26 Mar 2014 04:23:32 -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=p1XiT7ZR77i0qPnDf9PdzA3FaQhdIPIyDJdhLQUd0Fs=; b=RNpA7ysa4XXtIigRc9ogXtXIRXsdqrvdIpeoEBgfdNkleqRADOazLL8fl7q+SdGb61 aUPDR9lHOqscCvoI9usvu8iu9c3dK0N0YBryixlNQUDZ5s7N4LhcQvLuOelG//w7nJ4Q Vfm0oNb0iCWuUHX+dHGlf7pFtq+6EsD33F2qTh4+z3e2D+L8W3hbmd1RGds0JL6sr+O7 nMaVUkCLz2IIMRfPyPII7a6lPNLlYvHEogJmT7uDKWF4pw1baaf1Z2+rq3J0dSoaDuEE /p2ulKMz10nwHAcWBhlCbrKeOEtuH5NTKLZHuCQXwMBz3QxUV4pWv9WljMXde9I6Yltx kucw== X-Gm-Message-State: ALoCoQndb32dmhP+0MjrUq2d64koViI5rt4eSCcPoVAL3jtBIKaT9eKmIjsgGR+uPafmrCcMjjKu X-Received: by 10.58.170.6 with SMTP id ai6mr22159816vec.7.1395833012139; Wed, 26 Mar 2014 04:23:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.120 with SMTP id y111ls629640qgd.0.gmail; Wed, 26 Mar 2014 04:23:32 -0700 (PDT) X-Received: by 10.58.90.99 with SMTP id bv3mr96260veb.34.1395833012005; Wed, 26 Mar 2014 04:23:32 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id fx7si4388490vcb.45.2014.03.26.04.23.31 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 26 Mar 2014 04:23:31 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id pa12so2128271veb.14 for ; Wed, 26 Mar 2014 04:23:31 -0700 (PDT) X-Received: by 10.58.185.145 with SMTP id fc17mr61490573vec.14.1395833011589; Wed, 26 Mar 2014 04:23:31 -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.78.9 with SMTP id i9csp38101vck; Wed, 26 Mar 2014 04:23:31 -0700 (PDT) X-Received: by 10.66.162.74 with SMTP id xy10mr86292231pab.4.1395833010496; Wed, 26 Mar 2014 04:23:30 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zw7si9858230pac.193.2014.03.26.04.23.29; Wed, 26 Mar 2014 04:23:29 -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 S1754889AbaCZLXQ (ORCPT + 26 others); Wed, 26 Mar 2014 07:23:16 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:37060 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754320AbaCZLXM (ORCPT ); Wed, 26 Mar 2014 07:23:12 -0400 Received: by mail-we0-f174.google.com with SMTP id t60so1039880wes.33 for ; Wed, 26 Mar 2014 04:23:11 -0700 (PDT) X-Received: by 10.180.106.40 with SMTP id gr8mr30554894wib.31.1395832991212; Wed, 26 Mar 2014 04:23:11 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id ga20sm1811037wic.0.2014.03.26.04.23.07 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 26 Mar 2014 04:23:10 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, linaro-networking@linaro.org, Viresh Kumar Subject: [PATCH 14/14] timer: don't emulate notifier call to initialize timer base Date: Wed, 26 Mar 2014 16:51:20 +0530 Message-Id: <6df650d6e6d696a555b6cf81d53b428530496e63.1395832156.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.128.169 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);