linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [RFC 4/9] of/irq: Refactor interrupt-map parsing [CPU hotplug clockevents issue]
       [not found] ` <1381869563-16083-5-git-send-email-grant.likely@linaro.org>
@ 2013-10-31 20:45   ` Stephen Warren
       [not found]   ` <CAOesGMj03kgJXttm80pHvPYeqg5hOaeOJAJ4DA8tf5LxqdArrQ@mail.gmail.com>
  1 sibling, 0 replies; 2+ messages in thread
From: Stephen Warren @ 2013-10-31 20:45 UTC (permalink / raw)
  To: Grant Likely
  Cc: devicetree, linux-kernel, Benjamin Herrenschmidt, linux-next,
	Stephen Boyd

On 10/15/2013 02:39 PM, Grant Likely wrote:
> All the users of of_irq_parse_raw pass in a raw interrupt specifier from
> the device tree and expect it to be returned (possibly modified) in an
> of_phandle_args structure. However, the primary function of
> of_irq_parse_raw() is to check for translations due to the presence of
> one or more interrupt-map properties. The actual placing of the data
> into an of_phandle_args structure is trivial. If it is refactored to
> accept an of_phandle_args structure directly, then it becomes possible
> to consume of_phandle_args from other sources. This is important for an
> upcoming patch that allows a device to be connected to more than one
> interrupt parent. It also simplifies the code a bit.
> 
> The biggest complication with this patch is that the old version works
> on the interrupt specifiers in __be32 form, but the of_phandle_args
> structure is intended to carry it in the cpu-native version. A bit of
> churn was required to make this work. In the end it results in tighter
> code, so the churn is worth it.

This commit appears to cause kernel error spew while performing CPU
hotplug operations on Tegra114. For example, see the log at the end of
this message.

I guess this boot-time message is the clue:

[    0.000000] arch_timer: No interrupt available, giving up

which corresponds to this diff in /proc/interrupts:

> - 27:       2929       2216       2027       1922       GIC  27  arch_timer

The relevant DT node is probably:

>         timer {
>                 compatible = "arm,armv7-timer";
>                 interrupts =
>                         <GIC_PPI 13
>                                 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
>                         <GIC_PPI 14
>                                 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
>                         <GIC_PPI 11
>                                 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
>                         <GIC_PPI 10
>                                 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
>         };

I guess this is a similar problem to that which Olof reported; there's
no reg property in that node, yet #size-cells=<0> since the timer node
is a direct child of the root node.

Hotplug error spew:

> root@localhost:~# ./cpuonline.py 
> echo 0 > /sys/devices/system/cpu/cpu2/online
> [   46.753347] CPU2: shutdown
> echo 0 > /sys/devices/system/cpu/cpu1/online
> [   48.848007] CPU1: shutdown
> echo 0 > /sys/devices/system/cpu/cpu3/online
> [   50.897720] CPU3: shutdown
> echo 1 > /sys/devices/system/cpu/cpu1/online
> [   52.949980] CPU1: Booted secondary processor
> [   52.961188] Clockevents: could not switch to one-shot mode: dummy_timer is not functional.
> [   52.969566] Could not switch to high resolution mode on CPU 1
> echo 1 > /sys/devices/system/cpu/cpu2/online
> [   54.999852] CPU2: Booted secondary processor
> [   55.011164] Clockevents: could not switch to one-shot mode: dummy_timer is not functional.
> [   55.019543] Could not switch to high resolution mode on CPU 2
> echo 0 > /sys/devices/system/cpu/cpu1/online
> [   57.048730] CPU1: shutdown
> echo 1 > /sys/devices/system/cpu/cpu3/online
> [   59.088927] CPU3: Booted secondary processor
> [   59.101149] Clockevents: could not switch to one-shot mode: dummy_timer is not functional.
> [   59.109517] Could not switch to high resolution mode on CPU 3
> echo 1 > /sys/devices/system/cpu/cpu1/online
> [   61.129737] CPU1: Booted secondary processor
> [   61.141161] Clockevents: could not switch to one-shot mode: dummy_timer is not functional.
> [   61.149540] Could not switch to high resolution mode on CPU 1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC 4/9] of/irq: Refactor interrupt-map parsing
       [not found]           ` <20131101175317.A812AC40868-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
@ 2013-11-01 19:07             ` Stephen Warren
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Warren @ 2013-11-01 19:07 UTC (permalink / raw)
  To: Grant Likely, Olof Johansson
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Linux Kernel Mailing List,
	Kevin Hilman, Benjamin Herrenschmidt,
	linux-next-u79uwXL29TY76Z2rM5mHXA, Stephen Boyd

On 11/01/2013 11:53 AM, Grant Likely wrote:
> On Thu, 31 Oct 2013 11:57:14 -0700, Olof Johansson <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org> wrote:
>> On Wed, Oct 30, 2013 at 02:25:21PM -0700, Grant Likely wrote:
>>> (Sorry for HTML mail)
>>>
>>> Can you put #define DEBUG at the top of drivers/of/irq.c and send me the
>>> log output from before and after the commit?
>>
>> Here you go, quite verbose log below.
>>
>> Looks like we're tripping the "no reg passed in" checks, not sure if related.
> 
> I think I've found the bug. See if this helps...
> 
> From 54a6d89d63361f8117ff69e4b65efabb12b897c7 Mon Sep 17 00:00:00 2001
> From: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Date: Fri, 1 Nov 2013 10:50:50 -0700
> Subject: [PATCH] of: Fixup interrupt parsing failure.

Tested-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

Thanks, this fixes the clocksource errors that I was seeing when
performing CPU hotplug, as mentioned in:

https://lkml.org/lkml/2013/10/31/430
Re: [RFC 4/9] of/irq: Refactor interrupt-map parsing [CPU hotplug
clockevents issue]
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-11-01 19:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1381869563-16083-1-git-send-email-grant.likely@linaro.org>
     [not found] ` <1381869563-16083-5-git-send-email-grant.likely@linaro.org>
2013-10-31 20:45   ` [RFC 4/9] of/irq: Refactor interrupt-map parsing [CPU hotplug clockevents issue] Stephen Warren
     [not found]   ` <CAOesGMj03kgJXttm80pHvPYeqg5hOaeOJAJ4DA8tf5LxqdArrQ@mail.gmail.com>
     [not found]     ` <CACxGe6uE+KvycQq3XBavRcvprff6PhBaxX54W_Cb1cfuVpMXvQ@mail.gmail.com>
     [not found]       ` <20131031185714.GA12646@quad.lixom.net>
     [not found]         ` <20131101175317.A812AC40868@trevor.secretlab.ca>
     [not found]           ` <20131101175317.A812AC40868-WNowdnHR2B42iJbIjFUEsiwD8/FfD2ys@public.gmane.org>
2013-11-01 19:07             ` [RFC 4/9] of/irq: Refactor interrupt-map parsing Stephen Warren

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).