lkml.org 
[lkml]   [2022]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH -next] irq: print depth in __enable_irq WARNING
Date
Chen!

On Fri, Mar 25 2022 at 09:33, Chen Lifu wrote:

The subsystem prefix for the interrupt core is 'genirq' as you can easy
check via 'git log kernel/irq/manage.c'

> Since case 0 and 1 of desc->depth may print same warning messages as follows,
> according to the messages, we do not know in which case the warning is generated.
> This patch prints extra desc->depth in the warning messages to distinguish
> these cases.

This patch prints? The patch cannot print anything.

Please read the patch submission notes in Documentation/process/
including the tip tree specific rules in Documentation/process/maintainer-tip.html

> void __enable_irq(struct irq_desc *desc)
> {
> switch (desc->depth) {
> case 0:
> err_out:
> - WARN(1, KERN_WARNING "Unbalanced enable for IRQ %d\n",
> - irq_desc_get_irq(desc));
> + WARN(1, KERN_WARNING "depth %u: Unbalanced enable for IRQ %d\n",
> + desc->depth, irq_desc_get_irq(desc));

If we change this then we really want separate messages which makes it
clear what this is about. Something like:

if (likely(depth == 1)) {
if (WARN_ONCE(suspended, "Enable of suspended irq %d", irq))
return;
....
return;
}

if (WARN_ONCE(!depth, "Unbalanced enable of irq %d", irq))
return;

desc->depth--;

Hmm?

Thanks,

tglx

\
 
 \ /
  Last update: 2022-04-10 21:41    [W:0.031 / U:2.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site