linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: tglx@linutronix.de, linaro-kernel@lists.linaro.org,
	linux-kernel@vger.kernel.org, fweisbec@gmail.com,
	linaro-networking@linaro.org
Subject: Re: [PATCH 14/14] timer: don't emulate notifier call to initialize timer base
Date: Wed, 26 Mar 2014 18:13:43 +0530	[thread overview]
Message-ID: <5332CB7F.3070002@linux.vnet.ibm.com> (raw)
In-Reply-To: <6df650d6e6d696a555b6cf81d53b428530496e63.1395832156.git.viresh.kumar@linaro.org>

On 03/26/2014 04:51 PM, Viresh Kumar wrote:
> 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().
>

Same here: I don't think this is a good idea, for the same reason I gave
for patch 12.

Regards,
Srivatsa S. Bhat
 
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  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);
> 


  reply	other threads:[~2014-03-26 12:44 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-26 11:21 [PATCH 00/14] timers/hrtimers: Minor cleanups Viresh Kumar
2014-03-26 11:21 ` [PATCH 01/14] hrtimer: replace 'tab' with 'space' after 'comma' Viresh Kumar
2014-03-26 11:21 ` [PATCH 02/14] hrtimer: Coalesce format fragments in printk() Viresh Kumar
2014-03-26 11:21 ` [PATCH 03/14] hrtimer: call hrtimer_set_expires_range() from hrtimer_set_expires_range_ns() Viresh Kumar
2014-03-26 11:21 ` [PATCH 04/14] hrtimer: use base->index instead of basenum in switch_hrtimer_base() Viresh Kumar
2014-03-26 11:43   ` Srivatsa S. Bhat
2014-03-26 14:08     ` [LNG] " Viresh Kumar
2014-03-26 17:31     ` Thomas Gleixner
2014-03-26 17:57       ` Srivatsa S. Bhat
2014-03-26 11:21 ` [PATCH 05/14] hrtimer: no need to rewrite '1' to hrtimer_hres_enabled Viresh Kumar
2014-03-26 11:21 ` [PATCH 06/14] hrtimer: don't rewrite same value to expires_next in hrtimer_force_reprogram() Viresh Kumar
2014-03-26 11:21 ` [PATCH 07/14] hrtimer: use base->hres_active directly instead of hrtimer_hres_active() Viresh Kumar
2014-03-26 11:21 ` [PATCH 08/14] hrtimer: remove dummy definition of hrtimer_force_reprogram() Viresh Kumar
2014-03-26 11:21 ` [PATCH 09/14] hrtimer: don't check state of base->hres_active in hrtimer_switch_to_hres() Viresh Kumar
2014-03-26 11:21 ` [PATCH 10/14] hrtimer: remove clock_was_set_delayed() from hrtimer.h Viresh Kumar
2014-03-26 11:21 ` [PATCH 11/14] hrtimer: remove active_bases field from struct hrtimer_cpu_base Viresh Kumar
2014-03-26 17:28   ` Thomas Gleixner
2014-03-27  4:30     ` Viresh Kumar
2014-03-26 11:21 ` [PATCH 12/14] hrtimer: don't emulate notifier call to initialize timer base Viresh Kumar
2014-03-26 12:40   ` Srivatsa S. Bhat
2014-03-26 14:17     ` [LNG] " Viresh Kumar
2014-03-26 11:21 ` [PATCH 13/14] timer: simplify CPU_UP_PREPARE notifier code path Viresh Kumar
2014-03-26 12:47   ` Srivatsa S. Bhat
2014-03-26 11:21 ` [PATCH 14/14] timer: don't emulate notifier call to initialize timer base Viresh Kumar
2014-03-26 12:43   ` Srivatsa S. Bhat [this message]
2014-03-27  5:23 ` [PATCH 1/2] hrtimer: don't add clock-base to active_bases if already present Viresh Kumar
2014-03-27  5:23   ` [PATCH V2 2/2] hrtimer: use __ffs() to iterate over valid bits from active_bases Viresh Kumar
2014-03-27  5:40     ` Thomas Gleixner
2014-03-27  5:46       ` Viresh Kumar
2014-03-27  5:49     ` [PATCH V3] " Viresh Kumar
2014-03-27  5:54       ` [PATCH V3 Resend] hrtimer: use ffs() " Viresh Kumar
2014-03-27  5:39   ` [PATCH 1/2] hrtimer: don't add clock-base to active_bases if already present Thomas Gleixner

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=5332CB7F.3070002@linux.vnet.ibm.com \
    --to=srivatsa.bhat@linux.vnet.ibm.com \
    --cc=fweisbec@gmail.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linaro-networking@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=viresh.kumar@linaro.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).