Re: [PATCH v2 01/26] genirq: add irq_domain-aware core IRQ handler

2014-09-01 Thread Russell King - ARM Linux
On Tue, Aug 26, 2014 at 11:46:38AM -0700, Stephen Boyd wrote:
> Ah ok. This is the multi-irq handler case? Has this been broken since
> v3.2 at least for the gic users? Now that we call irq_enter()/irq_exit()
> a lot more code runs, including things like updating jiffies when
> interrupts arrive and invoking softirq? Do we only call irq_exit() on
> the IPI path otherwise?
> 
> Are there any plans to send this back to stable trees? Not calling
> irq_enter()/irq_exit() when we get an interrupt seems like a big problem.

gic_handle_irq() calls handle_IRQ() which has the irq_enter()..irq_exit()
wrappers.

If we didn't have irq_exit(), then softirq's would be totally broken on
all gic-based platforms.

-- 
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/26] genirq: add irq_domain-aware core IRQ handler

2014-08-26 Thread Stephen Boyd
On 08/26/14 11:46, Stephen Boyd wrote:
> On 08/26/14 11:07, Marc Zyngier wrote:
>> Digging into my email, one of the traces looked like this:
>>
>> stack backtrace:
>> CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.16.0-rc1+ #135
>> Call trace:
>> [] dump_backtrace+0x0/0x12c
>> [] show_stack+0x10/0x1c
>> [] dump_stack+0x74/0xc4
>> [] lockdep_rcu_suspicious+0xe8/0x124
>> [] irq_find_mapping+0x16c/0x198
>> [] gic_handle_irq+0x38/0xcc
>>
>> Most drivers call irq_find_mapping outside of irq_enter()/irq_exit(), as
>> this is in handle_IRQ().
>>
> Ah ok. This is the multi-irq handler case? Has this been broken since
> v3.2 at least for the gic users? Now that we call irq_enter()/irq_exit()
> a lot more code runs, including things like updating jiffies when
> interrupts arrive and invoking softirq? Do we only call irq_exit() on
> the IPI path otherwise?
>
> Are there any plans to send this back to stable trees? Not calling
> irq_enter()/irq_exit() when we get an interrupt seems like a big problem.
>

Hmm I see we still call handle_IRQ eventually. So it's not as bad as I
first thought.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/26] genirq: add irq_domain-aware core IRQ handler

2014-08-26 Thread Stephen Boyd
On 08/26/14 11:07, Marc Zyngier wrote:
> Digging into my email, one of the traces looked like this:
>
> stack backtrace:
> CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.16.0-rc1+ #135
> Call trace:
> [] dump_backtrace+0x0/0x12c
> [] show_stack+0x10/0x1c
> [] dump_stack+0x74/0xc4
> [] lockdep_rcu_suspicious+0xe8/0x124
> [] irq_find_mapping+0x16c/0x198
> [] gic_handle_irq+0x38/0xcc
>
> Most drivers call irq_find_mapping outside of irq_enter()/irq_exit(), as
> this is in handle_IRQ().
>

Ah ok. This is the multi-irq handler case? Has this been broken since
v3.2 at least for the gic users? Now that we call irq_enter()/irq_exit()
a lot more code runs, including things like updating jiffies when
interrupts arrive and invoking softirq? Do we only call irq_exit() on
the IPI path otherwise?

Are there any plans to send this back to stable trees? Not calling
irq_enter()/irq_exit() when we get an interrupt seems like a big problem.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/26] genirq: add irq_domain-aware core IRQ handler

2014-08-26 Thread Marc Zyngier
On 26/08/14 18:42, Stephen Boyd wrote:
> On 08/26/14 03:03, Marc Zyngier wrote:
>> Calling irq_find_mapping from outside a irq_{enter,exit} section is
>> unsafe and produces ugly messages if CONFIG_PROVE_RCU is enabled:
>> If coming from the idle state, the rcu_read_lock call in irq_find_mapping
>> will generate an unpleasant warning:
>>
>> 
>> ===
>> [ INFO: suspicious RCU usage. ]
>> 3.16.0-rc1+ #135 Not tainted
>> ---
>> include/linux/rcupdate.h:871 rcu_read_lock() used illegally while idle!
>>
>> other info that might help us debug this:
>>
>> RCU used illegally from idle CPU!
>> rcu_scheduler_active = 1, debug_locks = 0
>> RCU used illegally from extended quiescent state!
>> 1 lock held by swapper/0/0:
>>  #0:  (rcu_read_lock){..}, at: []
>> irq_find_mapping+0x4c/0x198
> 
> Do you have the whole stacktrace? I don't see where this is called
> outside of irq_enter() from within the idle loop, but maybe I missed
> something.
> 

Hi Stephen,

Digging into my email, one of the traces looked like this:

stack backtrace:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 3.16.0-rc1+ #135
Call trace:
[] dump_backtrace+0x0/0x12c
[] show_stack+0x10/0x1c
[] dump_stack+0x74/0xc4
[] lockdep_rcu_suspicious+0xe8/0x124
[] irq_find_mapping+0x16c/0x198
[] gic_handle_irq+0x38/0xcc

Most drivers call irq_find_mapping outside of irq_enter()/irq_exit(), as
this is in handle_IRQ().

Thanks,

M.
-- 
Jazz is not dead. It just smells funny...
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 01/26] genirq: add irq_domain-aware core IRQ handler

2014-08-26 Thread Stephen Boyd
On 08/26/14 03:03, Marc Zyngier wrote:
> Calling irq_find_mapping from outside a irq_{enter,exit} section is
> unsafe and produces ugly messages if CONFIG_PROVE_RCU is enabled:
> If coming from the idle state, the rcu_read_lock call in irq_find_mapping
> will generate an unpleasant warning:
>
> 
> ===
> [ INFO: suspicious RCU usage. ]
> 3.16.0-rc1+ #135 Not tainted
> ---
> include/linux/rcupdate.h:871 rcu_read_lock() used illegally while idle!
>
> other info that might help us debug this:
>
> RCU used illegally from idle CPU!
> rcu_scheduler_active = 1, debug_locks = 0
> RCU used illegally from extended quiescent state!
> 1 lock held by swapper/0/0:
>  #0:  (rcu_read_lock){..}, at: []
> irq_find_mapping+0x4c/0x198

Do you have the whole stacktrace? I don't see where this is called
outside of irq_enter() from within the idle loop, but maybe I missed
something.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html