From: Marc Zyngier <marc.zyngier@arm.com>
To: Jon Hunter <jonathanh@nvidia.com>,
Linus Walleij <linus.walleij@linaro.org>
Cc: John Stultz <john.stultz@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
lkml <linux-kernel@vger.kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: Re: [Regression] "irqdomain: Don't set type when mapping an IRQ" breaks nexus7 gpio buttons
Date: Wed, 10 Aug 2016 11:21:24 +0100 [thread overview]
Message-ID: <57AB0024.2010107@arm.com> (raw)
In-Reply-To: <cfaa58d2-dcde-cfa8-f6da-ee9502577a6b@nvidia.com>
On 10/08/16 10:56, Jon Hunter wrote:
> Hi Marc, Linus,
>
> On 10/08/16 10:41, Marc Zyngier wrote:
>> Hi Linus,
>>
>> On 10/08/16 00:03, Linus Walleij wrote:
>>> On Tue, Aug 9, 2016 at 3:20 PM, Jon Hunter <jonathanh@nvidia.com> wrote:
>>>
>>>> If that works, then does the following also work (without the above) ...
>>>>
>>>> diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
>>>> index b4c1bc7c9ca2..e111b72e3162 100644
>>>> --- a/kernel/irq/chip.c
>>>> +++ b/kernel/irq/chip.c
>>>> @@ -824,6 +824,7 @@ __irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle,
>>>> irq_settings_set_norequest(desc);
>>>> irq_settings_set_nothread(desc);
>>>> desc->action = &chained_action;
>>>> + __irq_set_trigger(desc, irqd_get_trigger_type(&desc->irq_data));
>>>> irq_startup(desc, true);
>>>> }
>>>> }
>>>>
>>>> It looks like there is a path for parent interrupts where the type
>>>> is not getting set. If the above works then we can discuss with Thomas
>>>> and Marc on the correct fix.
>>>
>>> I tried this on my problematic platform and then this happens:
>>>
>>> preparing networking...
>>> [ 2.628246] ------------[ cut here ]------------
>>> [ 2.628303] WARNING: CPU: 0 PID: 92 at ../kernel/irq/chip.c:26
>>> bad_chained_irq+0x44/0x4c
>>> [ 2.631939] Chained irq 109 should not call an action
>>> [ 2.640008] Modules linked in:
>>> [ 2.647909] CPU: 0 PID: 92 Comm: ip Not tainted
>>> 4.8.0-rc1-00011-ga21e27b4cb66 #194
>>> [ 2.647996] Hardware name: Generic DT based system
>>> [ 2.655486] [<c030f8c8>] (unwind_backtrace) from [<c030c714>]
>>> (show_stack+0x10/0x14)
>>> [ 2.660254] [<c030c714>] (show_stack) from [<c05df420>]
>>> (dump_stack+0x78/0x8c)
>>> [ 2.668147] [<c05df420>] (dump_stack) from [<c031cef4>] (__warn+0xec/0x104)
>>> [ 2.675173] [<c031cef4>] (__warn) from [<c031cf44>]
>>> (warn_slowpath_fmt+0x38/0x48)
>>> [ 2.682033] [<c031cf44>] (warn_slowpath_fmt) from [<c0369160>]
>>> (bad_chained_irq+0x44/0x4c)
>>> [ 2.689687] [<c0369160>] (bad_chained_irq) from [<c0365e28>]
>>> (__handle_irq_event_percpu+0x5c/0x290)
>>> [ 2.697836] [<c0365e28>] (__handle_irq_event_percpu) from
>>> [<c0366078>] (handle_irq_event_percpu+0x1c/0x58)
>>> [ 2.706778] [<c0366078>] (handle_irq_event_percpu) from
>>> [<c03660ec>] (handle_irq_event+0x38/0x5c)
>>> [ 2.716498] [<c03660ec>] (handle_irq_event) from [<c03693f0>]
>>> (handle_level_irq+0xc4/0x150)
>>> [ 2.725438] [<c03693f0>] (handle_level_irq) from [<c036542c>]
>>> (generic_handle_irq+0x24/0x34)
>>> [ 2.733602] [<c036542c>] (generic_handle_irq) from [<c06127d4>]
>>> (msm_gpio_irq_handler+0xc8/0x150)
>>> [ 2.742280] [<c06127d4>] (msm_gpio_irq_handler) from [<c036542c>]
>>> (generic_handle_irq+0x24/0x34)
>>> [ 2.751048] [<c036542c>] (generic_handle_irq) from [<c0365720>]
>>> (__handle_domain_irq+0x7c/0xec)
>>> [ 2.759901] [<c0365720>] (__handle_domain_irq) from [<c0301464>]
>>> (gic_handle_irq+0x48/0x8c)
>>> [ 2.768323] [<c0301464>] (gic_handle_irq) from [<c08b8e4c>]
>>> (__irq_svc+0x6c/0xa8)
>>> [ 2.776644] Exception stack(0xdeca1d48 to 0xdeca1d90)
>>> [ 2.784284] 1d40: deca1dc0 00000000 00000000
>>> deca0018 ffff8bd6 deca1dc0
>>> [ 2.789324] 1d60: 00000000 c0378ad0 60070013 00000000 00000000
>>> 001f3df8 c108fa04 deca1d98
>>> [ 2.797481] 1d80: c08b77fc c0377930 60070013 ffffffff
>>> [ 2.805651] [<c08b8e4c>] (__irq_svc) from [<c0377930>]
>>> (init_timer_key+0x28/0x104)
>>> [ 2.810679] [<c0377930>] (init_timer_key) from [<c08b77fc>]
>>> (schedule_timeout+0x48/0x410)
>>> [ 2.818145] [<c08b77fc>] (schedule_timeout) from [<c0378ad0>]
>>> (msleep+0x2c/0x38)
>>> [ 2.826399] [<c0378ad0>] (msleep) from [<c06c2980>]
>>> (smsc911x_open+0x268/0x50c)
>>> [ 2.833859] [<c06c2980>] (smsc911x_open) from [<c07c1994>]
>>> (__dev_open+0xa8/0x10c)
>>> [ 2.840887] [<c07c1994>] (__dev_open) from [<c07c1c1c>]
>>> (__dev_change_flags+0x94/0x144)
>>> [ 2.848525] [<c07c1c1c>] (__dev_change_flags) from [<c07c1ce4>]
>>> (dev_change_flags+0x18/0x48)
>>> [ 2.856428] [<c07c1ce4>] (dev_change_flags) from [<c0823048>]
>>> (devinet_ioctl+0x6b0/0x768)
>>> [ 2.865120] [<c0823048>] (devinet_ioctl) from [<c07a4ac4>]
>>> (sock_ioctl+0x1f4/0x2c8)
>>> [ 2.873186] [<c07a4ac4>] (sock_ioctl) from [<c0432678>]
>>> (do_vfs_ioctl+0x9c/0x910)
>>> [ 2.880645] [<c0432678>] (do_vfs_ioctl) from [<c0432f20>]
>>> (SyS_ioctl+0x34/0x5c)
>>> [ 2.888290] [<c0432f20>] (SyS_ioctl) from [<c0308480>]
>>> (ret_fast_syscall+0x0/0x3c)
>>> [ 2.895395] ---[ end trace a53e1e63b7bdfc4a ]---
>>> [ 2.903917] random: fast init done
>>> [ 3.036378] random: crng init done
>>> [ 3.883906] irq 109: nobody cared (try booting with the "irqpoll" option)
>>> [ 3.883940] CPU: 0 PID: 92 Comm: ip Tainted: G W
>>> 4.8.0-rc1-00011-ga21e27b4cb66 #194
>>> [ 3.889673] Hardware name: Generic DT based system
>>> [ 3.898538] [<c030f8c8>] (unwind_backtrace) from [<c030c714>]
>>> (show_stack+0x10/0x14)
>>> [ 3.903137] [<c030c714>] (show_stack) from [<c05df420>]
>>> (dump_stack+0x78/0x8c)
>>> [ 3.911034] [<c05df420>] (dump_stack) from [<c0368804>]
>>> (__report_bad_irq+0x28/0xcc)
>>> [ 3.918065] [<c0368804>] (__report_bad_irq) from [<c0368c18>]
>>> (note_interrupt+0x298/0x2e8)
>>> [ 3.925971] [<c0368c18>] (note_interrupt) from [<c03660a8>]
>>> (handle_irq_event_percpu+0x4c/0x58)
>>> [ 3.934040] [<c03660a8>] (handle_irq_event_percpu) from
>>> [<c03660ec>] (handle_irq_event+0x38/0x5c)
>>> [ 3.942634] [<c03660ec>] (handle_irq_event) from [<c03693f0>]
>>> (handle_level_irq+0xc4/0x150)
>>> [ 3.951660] [<c03693f0>] (handle_level_irq) from [<c036542c>]
>>> (generic_handle_irq+0x24/0x34)
>>> [ 3.959821] [<c036542c>] (generic_handle_irq) from [<c06127d4>]
>>> (msm_gpio_irq_handler+0xc8/0x150)
>>> [ 3.968502] [<c06127d4>] (msm_gpio_irq_handler) from [<c036542c>]
>>> (generic_handle_irq+0x24/0x34)
>>> [ 3.977269] [<c036542c>] (generic_handle_irq) from [<c0365720>]
>>> (__handle_domain_irq+0x7c/0xec)
>>> [ 3.986122] [<c0365720>] (__handle_domain_irq) from [<c0301464>]
>>> (gic_handle_irq+0x48/0x8c)
>>> [ 3.994541] [<c0301464>] (gic_handle_irq) from [<c08b8e4c>]
>>> (__irq_svc+0x6c/0xa8)
>>> [ 4.002865] Exception stack(0xdeca1c60 to 0xdeca1ca8)
>>> [ 4.010507] 1c60: 00000000 c0abce68 c109f9c0 00000000 c109f9c0
>>> 00000000 deca0000 00000000
>>> [ 4.015546] 1c80: 00000282 deca1d48 c0210800 001f3df8 e080400c
>>> deca1cb0 c0322330 c0322340
>>> [ 4.023701] 1ca0: 20070113 ffffffff
>>> [ 4.031868] [<c08b8e4c>] (__irq_svc) from [<c0322340>]
>>> (__do_softirq+0x9c/0x388)
>>> [ 4.035166] [<c0322340>] (__do_softirq) from [<c03228f0>]
>>> (irq_exit+0xc0/0xfc)
>>> [ 4.042805] [<c03228f0>] (irq_exit) from [<c0365724>]
>>> (__handle_domain_irq+0x80/0xec)
>>> [ 4.049835] [<c0365724>] (__handle_domain_irq) from [<c0301464>]
>>> (gic_handle_irq+0x48/0x8c)
>>> [ 4.057735] [<c0301464>] (gic_handle_irq) from [<c08b8e4c>]
>>> (__irq_svc+0x6c/0xa8)
>>> [ 4.065887] Exception stack(0xdeca1d48 to 0xdeca1d90)
>>> [ 4.073528] 1d40: deca1dc0 00000000 00000000
>>> deca0018 ffff8bd6 deca1dc0
>>> [ 4.078566] 1d60: 00000000 c0378ad0 60070013 00000000 00000000
>>> 001f3df8 c108fa04 deca1d98
>>> [ 4.086723] 1d80: c08b77fc c0377930 60070013 ffffffff
>>> [ 4.094889] [<c08b8e4c>] (__irq_svc) from [<c0377930>]
>>> (init_timer_key+0x28/0x104)
>>> [ 4.099921] [<c0377930>] (init_timer_key) from [<c08b77fc>]
>>> (schedule_timeout+0x48/0x410)
>>> [ 4.107389] [<c08b77fc>] (schedule_timeout) from [<c0378ad0>]
>>> (msleep+0x2c/0x38)
>>> [ 4.115640] [<c0378ad0>] (msleep) from [<c06c2980>]
>>> (smsc911x_open+0x268/0x50c)
>>> [ 4.123100] [<c06c2980>] (smsc911x_open) from [<c07c1994>]
>>> (__dev_open+0xa8/0x10c)
>>> [ 4.130128] [<c07c1994>] (__dev_open) from [<c07c1c1c>]
>>> (__dev_change_flags+0x94/0x144)
>>> [ 4.137769] [<c07c1c1c>] (__dev_change_flags) from [<c07c1ce4>]
>>> (dev_change_flags+0x18/0x48)
>>> [ 4.145670] [<c07c1ce4>] (dev_change_flags) from [<c0823048>]
>>> (devinet_ioctl+0x6b0/0x768)
>>> [ 4.154357] [<c0823048>] (devinet_ioctl) from [<c07a4ac4>]
>>> (sock_ioctl+0x1f4/0x2c8)
>>> [ 4.162425] [<c07a4ac4>] (sock_ioctl) from [<c0432678>]
>>> (do_vfs_ioctl+0x9c/0x910)
>>> [ 4.169887] [<c0432678>] (do_vfs_ioctl) from [<c0432f20>]
>>> (SyS_ioctl+0x34/0x5c)
>>> [ 4.177529] [<c0432f20>] (SyS_ioctl) from [<c0308480>]
>>> (ret_fast_syscall+0x0/0x3c)
>>> [ 4.184635] handlers:
>>> [ 4.192273] [<c036911c>] bad_chained_irq
>>> [ 4.198255] Disabling IRQ #109
>>> (...)
>>> [ 34.170316] smsc911x 1b800000.ethernet-ebi2 eth0: ISR failed
>>> signaling test (IRQ 208)
>>
>> Is this platform related to the Dragonboard 410C? I've got one from
>> Sudeep, and it seems to work fine (though I've spotted a couple of
>> gotchas in the DT).
>
> Just to confirm is that with or without the proposed change?
The proposed change didn't have any impact on this board, but it may
just be that the firmware had done the right thing...
> Linus, I have been trying to find out which qcom board has this smsc911x
> but I was unable to find any, so more info on the platform would be great!
>
> I have been testing this on various Tegra boards that use gpio irqchips
> for various external functions and have not seen any such problems so far.
I'm also struggling to reproduce this issue, so any pointer to an easy
to source board would be appreciated (I can trade in Versatile/Realview
HW...).
Thanks,
M.
--
Jazz is not dead. It just smells funny...
next prev parent reply other threads:[~2016-08-10 18:41 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-30 4:39 [Regression] "irqdomain: Don't set type when mapping an IRQ" breaks nexus7 gpio buttons John Stultz
2016-07-30 4:52 ` Bjorn Andersson
2016-07-30 11:10 ` Marc Zyngier
2016-07-30 8:07 ` Thomas Gleixner
2016-08-05 18:12 ` John Stultz
2016-08-08 9:04 ` Jon Hunter
2016-08-08 21:50 ` Linus Walleij
2016-08-08 21:35 ` Linus Walleij
2016-08-01 10:26 ` Jon Hunter
2016-08-05 23:45 ` John Stultz
2016-08-08 9:31 ` Jon Hunter
2016-08-09 4:25 ` John Stultz
2016-08-09 13:20 ` Jon Hunter
2016-08-09 15:08 ` Marc Zyngier
2016-08-09 23:03 ` Linus Walleij
2016-08-10 9:41 ` Marc Zyngier
2016-08-10 9:56 ` Jon Hunter
2016-08-10 10:21 ` Marc Zyngier [this message]
2016-08-10 13:58 ` Linus Walleij
2016-08-10 14:12 ` Jon Hunter
2016-08-10 22:06 ` Linus Walleij
2016-08-10 13:50 ` Linus Walleij
2016-08-10 15:17 ` Marc Zyngier
2016-08-10 22:14 ` Linus Walleij
2016-08-08 21:48 ` Linus Walleij
2016-08-11 8:37 ` Marc Zyngier
2016-08-11 9:47 ` Jon Hunter
2016-08-11 11:45 ` Marc Zyngier
2016-08-11 11:53 ` Marc Zyngier
2016-08-11 12:46 ` Marc Zyngier
2016-08-11 13:29 ` Jon Hunter
2016-08-11 13:34 ` Marc Zyngier
2016-08-11 15:32 ` John Stultz
2016-08-11 15:51 ` Marc Zyngier
2016-08-11 21:08 ` Linus Walleij
2016-08-11 21:23 ` Bjorn Andersson
2016-08-12 10:22 ` Marc Zyngier
2016-08-11 12:01 ` Linus Walleij
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=57AB0024.2010107@arm.com \
--to=marc.zyngier@arm.com \
--cc=bjorn.andersson@linaro.org \
--cc=john.stultz@linaro.org \
--cc=jonathanh@nvidia.com \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.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