public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren@wwwdotorg.org>
To: Mark Rutland <mark.rutland@arm.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"nico@linaro.org" <nico@linaro.org>,
	Will Deacon <Will.Deacon@arm.com>,
	Marc Zyngier <Marc.Zyngier@arm.com>,
	"john.stultz@linaro.org" <john.stultz@linaro.org>,
	Santosh Shilimkar <santosh.shilimkar@ti.com>
Subject: Re: [PATCHv3 4/4] arm: Add generic timer broadcast support
Date: Thu, 07 Feb 2013 09:49:51 -0700	[thread overview]
Message-ID: <5113DB2F.9090606@wwwdotorg.org> (raw)
In-Reply-To: <20130207100403.GD16987@e106331-lin.cambridge.arm.com>

On 02/07/2013 03:04 AM, Mark Rutland wrote:
> Hi Stephen,
> 
> Sorry about this; I'm to blame for the bug.
> 
> On Wed, Feb 06, 2013 at 08:51:43PM +0000, Stephen Warren wrote:
>> On 01/14/2013 10:05 AM, Mark Rutland wrote:
>>> Implement timer_broadcast for the arm architecture, allowing for the use
>>> of clock_event_device_drivers decoupled from the timer tick broadcast
>>> mechanism.
>>
>> Mark, this patch is now in next-20130206 and causes a crash during boot
>> on Tegra. The reason appears to be because of:
>>
>>> diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
>>
>>> @@ -524,7 +524,6 @@ static void __cpuinit percpu_timer_setup(void)
>>>  	struct clock_event_device *evt = &per_cpu(percpu_clockevent, cpu);
>>>  
>>>  	evt->cpumask = cpumask_of(cpu);
>>> -	evt->broadcast = smp_timer_broadcast;
>>
>> After that change, evt->broadcast is never assigned, and hence is NULL.
>> Yet elsewhere in kernel/time/tick-broadcast.c it's used unconditionally:
>>
>> static void tick_do_broadcast(struct cpumask *mask)
>> ...
>> 	if (!cpumask_empty(mask)) {
>> ...
>> 		td = &per_cpu(tick_cpu_device, cpumask_first(mask));
>> 		td->evtdev->broadcast(mask);
>>
>> Now perhaps the Tegra timer driver simply isn't being set up correctly,
>> so the bug is there... But the only other place I can find where
>> ->broadcast is assigned is in tick_device_uses_broadcast() which only
>> does it for "non-functional" timers, which doesn't apply to Tegra's timer.
>>
> 
> The intent of 12ad100046: "clockevents: Add generic timer broadcast function"
> was to setup the broadcast function both for non-functional/dummy timers and
> those that stop in low-power states (CLOCK_EVT_FEAT_C3STOP). I missed the
> CLOCK_EVT_FEAT_C3STOP case.
> 
> I believe the patch below will fix this for Tegra and any other platforms where
> broadcast is required in low power states.
> 
> Stephen, could you test this for Tegra?

Tested-by: Stephen Warren <swarren@nvidia.com>

Thanks.

  parent reply	other threads:[~2013-02-07 16:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-14 17:05 [PATCHv3 0/4] clockevents: decouple broadcast mechanism from drivers Mark Rutland
2013-01-14 17:05 ` [PATCHv3 1/4] clockevents: Add generic timer broadcast receiver Mark Rutland
2013-02-04 10:30   ` [tip:timers/core] " tip-bot for Mark Rutland
2013-01-14 17:05 ` [PATCHv3 2/4] clockevents: Add generic timer broadcast function Mark Rutland
2013-02-04 10:31   ` [tip:timers/core] " tip-bot for Mark Rutland
2013-01-14 17:05 ` [PATCHv3 3/4] arm: Use generic timer broadcast receiver Mark Rutland
2013-01-14 17:05 ` [PATCHv3 4/4] arm: Add generic timer broadcast support Mark Rutland
2013-02-06 20:51   ` Stephen Warren
2013-02-07 10:04     ` Mark Rutland
2013-02-07 11:40       ` Santosh Shilimkar
2013-02-07 16:51         ` Stephen Warren
2013-02-08  6:48           ` Santosh Shilimkar
2013-02-07 17:17         ` Mark Rutland
2013-02-08  6:52           ` Santosh Shilimkar
2013-02-07 16:49       ` Stephen Warren [this message]
2013-02-07 17:25         ` Mark Rutland

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=5113DB2F.9090606@wwwdotorg.org \
    --to=swarren@wwwdotorg.org \
    --cc=Marc.Zyngier@arm.com \
    --cc=Will.Deacon@arm.com \
    --cc=john.stultz@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=nico@linaro.org \
    --cc=santosh.shilimkar@ti.com \
    --cc=tglx@linutronix.de \
    /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