linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 -next] genirq: Separate warning messages of enable of suspended irq
@ 2022-07-28 10:29 Chen Lifu
  2022-09-20  6:42 ` chenlifu
  0 siblings, 1 reply; 3+ messages in thread
From: Chen Lifu @ 2022-07-28 10:29 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel, chenlifu

Both unbalanced enable for irq and enable of suspended irq
print same warning messages, such as:
......
[20220314100142]------------[ cut here ]------------
[20220314100142]WARNING: CPU: 1 PID: 10332 at kernel/irq/manage.c:723 __enable_irq+0x58/0xa4
[20220314100142]Unbalanced enable for IRQ 38
......

It's confusing. Separate the warning messages to make it clear.
No functional changes.

Signed-off-by: Chen Lifu <chenlifu@huawei.com>
---
 kernel/irq/manage.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index 40fe7806cc8c..bf4f5f63b2d3 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -775,17 +775,19 @@ void disable_nmi_nosync(unsigned int irq)
 
 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));
 		break;
 	case 1: {
-		if (desc->istate & IRQS_SUSPENDED)
-			goto err_out;
+		if (desc->istate & IRQS_SUSPENDED) {
+			WARN(1, KERN_WARNING "Enable of suspended IRQ %d\n",
+			     irq_desc_get_irq(desc));
+			break;
+		}
 		/* Prevent probing on this irq: */
 		irq_settings_set_noprobe(desc);
 		/*
 		 * Call irq_startup() not irq_enable() here because the
 		 * interrupt might be marked NOAUTOEN. So irq_startup()
-- 
2.37.0


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

* Re: [PATCH v2 -next] genirq: Separate warning messages of enable of suspended irq
  2022-07-28 10:29 [PATCH v2 -next] genirq: Separate warning messages of enable of suspended irq Chen Lifu
@ 2022-09-20  6:42 ` chenlifu
  2022-10-31  0:39   ` chenlifu
  0 siblings, 1 reply; 3+ messages in thread
From: chenlifu @ 2022-09-20  6:42 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel

在 2022/7/28 18:29, Chen Lifu 写道:
> Both unbalanced enable for irq and enable of suspended irq
> print same warning messages, such as:
> ......
> [20220314100142]------------[ cut here ]------------
> [20220314100142]WARNING: CPU: 1 PID: 10332 at kernel/irq/manage.c:723 __enable_irq+0x58/0xa4
> [20220314100142]Unbalanced enable for IRQ 38
> ......
> 
> It's confusing. Separate the warning messages to make it clear.
> No functional changes.
> 
> Signed-off-by: Chen Lifu <chenlifu@huawei.com>
> ---
>   kernel/irq/manage.c | 8 +++++---
>   1 file changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
> index 40fe7806cc8c..bf4f5f63b2d3 100644
> --- a/kernel/irq/manage.c
> +++ b/kernel/irq/manage.c
> @@ -775,17 +775,19 @@ void disable_nmi_nosync(unsigned int irq)
>   
>   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));
>   		break;
>   	case 1: {
> -		if (desc->istate & IRQS_SUSPENDED)
> -			goto err_out;
> +		if (desc->istate & IRQS_SUSPENDED) {
> +			WARN(1, KERN_WARNING "Enable of suspended IRQ %d\n",
> +			     irq_desc_get_irq(desc));
> +			break;
> +		}
>   		/* Prevent probing on this irq: */
>   		irq_settings_set_noprobe(desc);
>   		/*
>   		 * Call irq_startup() not irq_enable() here because the
>   		 * interrupt might be marked NOAUTOEN. So irq_startup()
> 

Friendly ping ...

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

* Re: [PATCH v2 -next] genirq: Separate warning messages of enable of suspended irq
  2022-09-20  6:42 ` chenlifu
@ 2022-10-31  0:39   ` chenlifu
  0 siblings, 0 replies; 3+ messages in thread
From: chenlifu @ 2022-10-31  0:39 UTC (permalink / raw)
  To: tglx; +Cc: linux-kernel

在 2022/9/20 14:42, chenlifu 写道:
> 在 2022/7/28 18:29, Chen Lifu 写道:
>> Both unbalanced enable for irq and enable of suspended irq
>> print same warning messages, such as:
>> ......
>> [20220314100142]------------[ cut here ]------------
>> [20220314100142]WARNING: CPU: 1 PID: 10332 at kernel/irq/manage.c:723 
>> __enable_irq+0x58/0xa4
>> [20220314100142]Unbalanced enable for IRQ 38
>> ......
>>
>> It's confusing. Separate the warning messages to make it clear.
>> No functional changes.
>>
>> Signed-off-by: Chen Lifu <chenlifu@huawei.com>
>> ---
>>   kernel/irq/manage.c | 8 +++++---
>>   1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
>> index 40fe7806cc8c..bf4f5f63b2d3 100644
>> --- a/kernel/irq/manage.c
>> +++ b/kernel/irq/manage.c
>> @@ -775,17 +775,19 @@ void disable_nmi_nosync(unsigned int irq)
>>   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));
>>           break;
>>       case 1: {
>> -        if (desc->istate & IRQS_SUSPENDED)
>> -            goto err_out;
>> +        if (desc->istate & IRQS_SUSPENDED) {
>> +            WARN(1, KERN_WARNING "Enable of suspended IRQ %d\n",
>> +                 irq_desc_get_irq(desc));
>> +            break;
>> +        }
>>           /* Prevent probing on this irq: */
>>           irq_settings_set_noprobe(desc);
>>           /*
>>            * Call irq_startup() not irq_enable() here because the
>>            * interrupt might be marked NOAUTOEN. So irq_startup()
>>
> 
> Friendly ping ...
> 
> .

Friendly ping ...

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

end of thread, other threads:[~2022-10-31  0:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-28 10:29 [PATCH v2 -next] genirq: Separate warning messages of enable of suspended irq Chen Lifu
2022-09-20  6:42 ` chenlifu
2022-10-31  0:39   ` chenlifu

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