Message ID | 20220127113303.3012207-5-bigeasy@linutronix.de (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | Provide and use generic_handle_irq_safe() where appropriate. | expand |
Context | Check | Description |
---|---|---|
netdev/fixes_present | success | Fixes tag not required for -next series |
netdev/subject_prefix | success | Link |
netdev/cover_letter | success | Series has a cover letter |
netdev/patch_count | success | Link |
netdev/header_inline | success | No static functions without inline keyword in header files |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/cc_maintainers | success | CCed 2 of 2 maintainers |
netdev/build_clang | success | Errors and warnings before: 0 this patch: 0 |
netdev/module_param | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Signed-off-by tag matches author and committer |
netdev/verify_fixes | success | No Fixes tag |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/checkpatch | warning | WARNING: line length of 88 exceeds 80 columns |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/source_inline | success | Was 0 now: 0 |
netdev/tree_selection | success | Guessing tree name failed - patch did not apply |
On 1/27/22 2:33 PM, Sebastian Andrzej Siewior wrote: > generic_handle_irq() is invoked from a regular interrupt service > routing. This handler will become a forced-threaded handler on s/routing/routine/? > PREEMPT_RT and will be invoked with enabled interrupts. The > generic_handle_irq() must be invoked with disabled interrupts in order > to avoid deadlocks. > > Instead of manually disabling interrupts before invoking use > generic_handle_irq() which can be invoked with enabled and disabled > interrupts. > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> [...] MBR, Sergey
On Fri, 28 Jan 2022, Sergei Shtylyov wrote: > On 1/27/22 2:33 PM, Sebastian Andrzej Siewior wrote: > > > generic_handle_irq() is invoked from a regular interrupt service > > routing. This handler will become a forced-threaded handler on > > s/routing/routine/? > > > PREEMPT_RT and will be invoked with enabled interrupts. The > > generic_handle_irq() must be invoked with disabled interrupts in order > > to avoid deadlocks. > > > > Instead of manually disabling interrupts before invoking use > > generic_handle_irq() which can be invoked with enabled and disabled > > interrupts. > > > > Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > [...] > > MBR, Sergey What does that mean?
On 1/28/22 4:33 PM, Lee Jones wrote: >>> generic_handle_irq() is invoked from a regular interrupt service >>> routing. This handler will become a forced-threaded handler on >> >> s/routing/routine/? >> >>> PREEMPT_RT and will be invoked with enabled interrupts. The >>> generic_handle_irq() must be invoked with disabled interrupts in order >>> to avoid deadlocks. >>> >>> Instead of manually disabling interrupts before invoking use >>> generic_handle_irq() which can be invoked with enabled and disabled >>> interrupts. >>> >>> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> >> [...] >> >> MBR, Sergey > > What does that mean? That means that I think you had a typo in the word "routing". The s/// comes from vim, I think --where it means search and replace. MBR, Sergey
On 1/28/22 4:33 PM, Lee Jones wrote: >>> generic_handle_irq() is invoked from a regular interrupt service >>> routing. This handler will become a forced-threaded handler on >> >> s/routing/routine/? >> >>> PREEMPT_RT and will be invoked with enabled interrupts. The >>> generic_handle_irq() must be invoked with disabled interrupts in order >>> to avoid deadlocks. >>> >>> Instead of manually disabling interrupts before invoking use >>> generic_handle_irq() which can be invoked with enabled and disabled >>> interrupts. >>> >>> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> >> [...] >> >> MBR, Sergey > > What does that mean? Ah, you were asking about MBR! My best regards then. :-) MBR, Sergey
On Fri, 28 Jan 2022, Sergei Shtylyov wrote: > On 1/28/22 4:33 PM, Lee Jones wrote: > > >>> generic_handle_irq() is invoked from a regular interrupt service > >>> routing. This handler will become a forced-threaded handler on > >> > >> s/routing/routine/? > >> > >>> PREEMPT_RT and will be invoked with enabled interrupts. The > >>> generic_handle_irq() must be invoked with disabled interrupts in order > >>> to avoid deadlocks. > >>> > >>> Instead of manually disabling interrupts before invoking use > >>> generic_handle_irq() which can be invoked with enabled and disabled > >>> interrupts. > >>> > >>> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> > >> [...] > >> > >> MBR, Sergey > > > > What does that mean? > > Ah, you were asking about MBR! My best regards then. :-) Yes this. It's okay, Dan was kind enough to enlighten me. Every day is a school day on the list! :)
On 1/28/22 7:50 PM, Lee Jones wrote: [...] >>>>> generic_handle_irq() is invoked from a regular interrupt service >>>>> routing. This handler will become a forced-threaded handler on >>>> >>>> s/routing/routine/? >>>> >>>>> PREEMPT_RT and will be invoked with enabled interrupts. The >>>>> generic_handle_irq() must be invoked with disabled interrupts in order >>>>> to avoid deadlocks. >>>>> >>>>> Instead of manually disabling interrupts before invoking use >>>>> generic_handle_irq() which can be invoked with enabled and disabled >>>>> interrupts. >>>>> >>>>> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> >>>> [...] >>>> >>>> MBR, Sergey >>> >>> What does that mean? >> >> Ah, you were asking about MBR! My best regards then. :-) > > Yes this. It's okay, Dan was kind enough to enlighten me. > > Every day is a school day on the list! :) It's not exactly a well known phrase, I like it mainly because it also stands for the Master Boot Record. :-) MBR, Sergey
On 2022-01-28 13:23:08 [+0300], Sergei Shtylyov wrote: > On 1/27/22 2:33 PM, Sebastian Andrzej Siewior wrote: > > > generic_handle_irq() is invoked from a regular interrupt service > > routing. This handler will become a forced-threaded handler on > > s/routing/routine/? Yes, thank you. Sebastian
diff --git a/drivers/misc/hi6421v600-irq.c b/drivers/misc/hi6421v600-irq.c index 1c763796cf1fa..caa3de37698b0 100644 --- a/drivers/misc/hi6421v600-irq.c +++ b/drivers/misc/hi6421v600-irq.c @@ -117,8 +117,8 @@ static irqreturn_t hi6421v600_irq_handler(int irq, void *__priv) * If both powerkey down and up IRQs are received, * handle them at the right order */ - generic_handle_irq(priv->irqs[POWERKEY_DOWN]); - generic_handle_irq(priv->irqs[POWERKEY_UP]); + generic_handle_irq_safe(priv->irqs[POWERKEY_DOWN]); + generic_handle_irq_safe(priv->irqs[POWERKEY_UP]); pending &= ~HISI_IRQ_POWERKEY_UP_DOWN; } @@ -126,7 +126,7 @@ static irqreturn_t hi6421v600_irq_handler(int irq, void *__priv) continue; for_each_set_bit(offset, &pending, BITS_PER_BYTE) { - generic_handle_irq(priv->irqs[offset + i * BITS_PER_BYTE]); + generic_handle_irq_safe(priv->irqs[offset + i * BITS_PER_BYTE]); } }
generic_handle_irq() is invoked from a regular interrupt service routing. This handler will become a forced-threaded handler on PREEMPT_RT and will be invoked with enabled interrupts. The generic_handle_irq() must be invoked with disabled interrupts in order to avoid deadlocks. Instead of manually disabling interrupts before invoking use generic_handle_irq() which can be invoked with enabled and disabled interrupts. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- drivers/misc/hi6421v600-irq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)