From: Srinivas KANDAGATLA <srinivas.kandagatla@st.com>
To: Stephen Boyd <sboyd@codeaurora.org>
Cc: John Stultz <john.stultz@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Grant Likely <grant.likely@linaro.org>,
Rob Herring <rob.herring@calxeda.com>,
Rob Landley <rob@landley.net>,
devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Linus Walleij <linus.walleij@linaro.org>,
Stuart Menefy <stuart.menefy@st.com>,
Arnd Bergmann <arnd@arndb.de>,
Rob Herring <robherring2@gmail.com>,
Will Deacon <will.deacon@arm.com>
Subject: Re: [PATCH v5] clocksource:arm_global_timer: Add ARM global timer support.
Date: Mon, 24 Jun 2013 22:08:33 +0100 [thread overview]
Message-ID: <51C8B551.9080203@st.com> (raw)
In-Reply-To: <51C8A6C8.8000009@codeaurora.org>
On 24/06/13 21:06, Stephen Boyd wrote:
> On 06/24/13 08:53, Srinivas KANDAGATLA wrote:
>> +
>> +static void gt_clockevents_stop(struct clock_event_device *clk)
>> +{
>> + gt_clockevent_set_mode(CLOCK_EVT_MODE_UNUSED, clk);
>> + disable_percpu_irq(clk->irq);
>> +}
>> +
>> +static int __cpuinit gt_clockevents_setup(struct clock_event_device *clk)
>> +{
>> + struct clock_event_device *evt = this_cpu_ptr(gt_evt);
>> + return evt->name ? 0 : gt_clockevents_init(evt);
>> +}
>
> How does this work? gt_clockevents_stop() is using the
> clock_event_device struct from the ARM local timer layer whereas
> gt_clockevents_setup() is using a driver private allocation.
Thanks for pointing this..
This should fix it.
static void gt_clockevents_stop(struct clock_event_device *clk)
{
struct clock_event_device *evt = this_cpu_ptr(gt_evt);
gt_clockevent_set_mode(CLOCK_EVT_MODE_UNUSED, evt);
disable_percpu_irq(evt->irq);
}
Please just
> don't use the local timer API at all and use cpu notifiers instead.
Last time when I did try using cpu notifiers like arm_arch_timer, the
broadcast dummy timer did kick off and took over the local timer on the
secondary cpus. Resulting in lot of broadcast IPI's.
If I use cpu notifiers I will end up two clk events on a each core (one
dummy from arm/kernel/smp.c and other gt clk_evt). I think I can only
use cpu notifiers in my case once your patches are in.
Also I cant disable LOCAL_TIMERS as it y by default.
Am I missing something?
Am happy to move to cpu notifiers if it works, else the driver will be
broken.
Thanks,
srini
>
next prev parent reply other threads:[~2013-06-24 21:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 15:53 [PATCH v5] clocksource:arm_global_timer: Add ARM global timer support Srinivas KANDAGATLA
[not found] ` <1372089195-29219-1-git-send-email-srinivas.kandagatla-qxv4g6HH51o@public.gmane.org>
2013-06-24 20:01 ` Thomas Gleixner
2013-06-24 20:01 ` Thomas Gleixner
2013-06-24 21:10 ` Srinivas KANDAGATLA
2013-06-24 20:06 ` Stephen Boyd
2013-06-24 21:08 ` Srinivas KANDAGATLA [this message]
2013-06-24 22:00 ` Stephen Boyd
[not found] ` <51C8C172.8020207-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2013-06-25 8:40 ` Srinivas KANDAGATLA
2013-06-25 8:40 ` Srinivas KANDAGATLA
2013-06-24 22:08 ` Stephen Boyd
2013-06-25 8:38 ` Srinivas KANDAGATLA
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=51C8B551.9080203@st.com \
--to=srinivas.kandagatla@st.com \
--cc=arnd@arndb.de \
--cc=devicetree-discuss@lists.ozlabs.org \
--cc=grant.likely@linaro.org \
--cc=john.stultz@linaro.org \
--cc=linus.walleij@linaro.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=robherring2@gmail.com \
--cc=sboyd@codeaurora.org \
--cc=stuart.menefy@st.com \
--cc=tglx@linutronix.de \
--cc=will.deacon@arm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.