From: Stephen Boyd <sboyd@codeaurora.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Srinivas KANDAGATLA <srinivas.kandagatla@st.com>,
John Stultz <john.stultz@linaro.org>,
Linus Walleij <linus.walleij@linaro.org>,
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, Arnd Bergmann <arnd@arndb.de>,
Stephen Gallimore <stephen.gallimore@st.com>,
Stuart Menefy <stuart.menefy@st.com>,
Rob Herring <robherring2@gmail.com>,
Will Deacon <will.deacon@arm.com>
Subject: Re: [PATCH v4] clocksource:arm_global_timer: Add ARM global timer support.
Date: Fri, 21 Jun 2013 14:07:50 -0700 [thread overview]
Message-ID: <51C4C0A6.9090109@codeaurora.org> (raw)
In-Reply-To: <alpine.DEB.2.02.1306212250450.4013@ionos.tec.linutronix.de>
On 06/21/13 14:00, Thomas Gleixner wrote:
> On Fri, 21 Jun 2013, Stephen Boyd wrote:
>
>> On 06/21/13 08:56, Thomas Gleixner wrote:
>>>> +static irqreturn_t gt_clockevent_interrupt(int irq, void *dev_id)
>>>> +{
>>>> + struct clock_event_device *evt = *(struct clock_event_device **)dev_id;
>>> What kind of construct is this?
>>>
>>> You are using request_percpu_irq() and the device id is pointing to
>>> per cpu memory. Why do you need this horrible pointer indirection?
>>>
>>> Because a lot of other ARM code uses the same broken construct?
>> This is an artifact of the ARM local timer API. I have been trying for a
> No, it's not an artifact. It's a copy and paste issue. Looking at
> drivers/clocksource/arm_arch_timer.c
>
> arch_timer_evt = alloc_percpu(struct clock_event_device);
> ...
> err = request_percpu_irq(ppi, arch_timer_handler_virt,
> "arch_timer", arch_timer_evt);
>
> This code is correct and it does not need any of the changes.
>
> Doing it with the pointer madness is just wrong, nothing else. Even if
> there is a historic reason why the pointer juggling was necessary at
> some point, it's obviously not needed anymore.
>
> And historic crap is no justification for brainlessly copied code.
The arm architected timers do not use the ARM local timer API anymore.
So yes that code is correct now that it has been moved off the local
timer API. See commit 1ba1cefc277865a0ac222f53bbbf2ebacad1559a for more
info.
Please merge my patches so the ARM local timer API can go away.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2013-06-21 21:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-21 13:11 [PATCH v4] clocksource:arm_global_timer: Add ARM global timer support Srinivas KANDAGATLA
2013-06-21 15:56 ` Thomas Gleixner
2013-06-21 17:45 ` Stephen Boyd
2013-06-21 21:00 ` Thomas Gleixner
2013-06-21 21:07 ` Stephen Boyd [this message]
2013-06-24 9:07 ` 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=51C4C0A6.9090109@codeaurora.org \
--to=sboyd@codeaurora.org \
--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=srinivas.kandagatla@st.com \
--cc=stephen.gallimore@st.com \
--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 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).