mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux@arm.linux.org.uk" <linux@arm.linux.org.uk>,
	"nico@linaro.org" <nico@linaro.org>,
	Marc Zyngier <Marc.Zyngier@arm.com>,
	Will Deacon <Will.Deacon@arm.com>,
	"john.stultz@linaro.org" <john.stultz@linaro.org>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [RFC PATCH 2/5] clockevents: Add generic timer broadcast receiver
Date: Wed, 19 Dec 2012 10:19:34 +0000	[thread overview]
Message-ID: <20121219101934.GD32484@e106331-lin.cambridge.arm.com> (raw)
In-Reply-To: <50D0EB67.2060802@codeaurora.org>

On Tue, Dec 18, 2012 at 10:17:11PM +0000, Stephen Boyd wrote:
> On 12/18/12 04:06, Mark Rutland wrote:
> > diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c
> > index f113755..c2dd022 100644
> > --- a/kernel/time/tick-broadcast.c
> > +++ b/kernel/time/tick-broadcast.c
> > @@ -125,6 +125,21 @@ int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu)
> >  	return ret;
> >  }
> >  
> > +int tick_receive_broadcast(void)
> > +{
> > +	struct tick_device *td = this_cpu_ptr(&tick_cpu_device);
> > +	struct clock_event_device *evt = td->evtdev;
> > +
> > +	if (!evt)
> > +		return -ENODEV;
> > +
> > +	if (!evt->event_handler)
> > +		return -EINVAL;
> > +
> 
> Does this actually happen? It's not obvious to me how it does.

Taking a look at it, I don't think it does. Any tick_device's
clock_event_device should have an event_handler. I'll drop this check.

A tick device might not have a clock_event_device registered in some cases --
the x86 lapic timer has to deal with interrupts pending across a kexec, where
interrupts are enabled before local timers are registered. I'm not sure how
common this problem might be though, and whether it should be dealt with here
or elsewhere.

> > +	evt->event_handler(evt);
> > +	return 0;
> > +}
> > +
> >  /*
> >   * Broadcast the event to the cpus, which are set in the mask (mangled).
> >   */
> 
> 
> -- 
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> hosted by The Linux Foundation
> 

Thanks,
Mark.


  reply	other threads:[~2012-12-19 10:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18 12:06 [RFC PATCH 0/5] clockevents: decouple broadcast mechanism from drivers Mark Rutland
2012-12-18 12:06 ` [RFC PATCH 1/5] ARM: remove useless guard in smp.c Mark Rutland
2012-12-18 18:47   ` Stephen Boyd
2012-12-19  9:40     ` Mark Rutland
2012-12-21 10:02   ` Santosh Shilimkar
2013-01-02 11:14     ` Mark Rutland
2012-12-18 12:06 ` [RFC PATCH 2/5] clockevents: Add generic timer broadcast receiver Mark Rutland
2012-12-18 22:17   ` Stephen Boyd
2012-12-19 10:19     ` Mark Rutland [this message]
2012-12-21 10:02   ` Santosh Shilimkar
2013-01-02 10:59     ` Mark Rutland
2012-12-18 12:06 ` [RFC PATCH 3/5] ARM: Use generic timer broadcast receive Mark Rutland
2012-12-18 12:06 ` [RFC PATCH 4/5] clockevents: Add generic timer broadcast function Mark Rutland
2012-12-18 22:17   ` Stephen Boyd
2012-12-19 10:37     ` Mark Rutland
2012-12-18 12:06 ` [RFC PATCH 5/5] ARM: Add generic timer broadcast support Mark Rutland
2012-12-21 10:08 ` [RFC PATCH 0/5] clockevents: decouple broadcast mechanism from drivers Santosh Shilimkar
2013-01-02 11:41   ` 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=20121219101934.GD32484@e106331-lin.cambridge.arm.com \
    --to=mark.rutland@arm.com \
    --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=linux@arm.linux.org.uk \
    --cc=nico@linaro.org \
    --cc=sboyd@codeaurora.org \
    --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

all inboxes | Powered by JetHome®