[v2] Fix hvc console issue by using OPAL event.

Submitted by ppaidipe@linux.vnet.ibm.com on Feb. 22, 2017, 6:02 a.m.

Details

Message ID 1487743362-1160-1-git-send-email-ppaidipe@linux.vnet.ibm.com
State New
Headers show

Commit Message

ppaidipe@linux.vnet.ibm.com Feb. 22, 2017, 6:02 a.m.
From: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>

This reverts part of commit 583c8203dcb26b42cea81e4734ea926dae05dbb9.

Below is the WARNING in pre 4.2 linux kernels which is raised in firenze
systems due to interrupts mapping failure.

[    0.947741] irq: irq-62==>hwirq-0x3e mapping failed: -22
[    0.947793] ------------[ cut here ]------------
[    0.947838] WARNING: at kernel/irq/irqdomain.c:485

So this commit 583c8203dcb26b42cea81e4734ea926dae05dbb9 is causing
the above kernel WARNING(found by git-bisect).

As per suggestion by Alistair, Use OPAL event instead of interrupts
to avoid the warning. Tested on RHEL and Ubuntu OS's, not seen any
kernel warning's.

[    1.745145] hvc0: raw protocol on /ibm,opal/consoles/serial@0 (boot console)
[    1.745223] hvc0: No interrupts property, using OPAL event
[    1.745556] hvc1: hvsi protocol on /ibm,opal/consoles/serial@1
[    1.745622] hvc1: No interrupts property, using OPAL event

Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
---
Changes since v1:

	Use OPAL event instead of interrupts to avoid the
	kernel warning.

 hw/fsp/fsp-console.c | 6 ------
 1 file changed, 6 deletions(-)

Comments

Alistair Popple May 4, 2017, 6:10 a.m.
Hi Pridhiviraj,

There were some subtlties here with different kernel versions that
unfortunately I only vaguely recall. Which specific kernel versions
and systems have you tested this on? Sam do you think this will cause
issues on Firenze when there is data on the second serial console?

Regards,

Alistair

On Wed, 22 Feb 2017 11:32:42 AM ppaidipe@linux.vnet.ibm.com wrote:
> From: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
>
> This reverts part of commit 583c8203dcb26b42cea81e4734ea926dae05dbb9.
>
> Below is the WARNING in pre 4.2 linux kernels which is raised in firenze
> systems due to interrupts mapping failure.
>
> [    0.947741] irq: irq-62==>hwirq-0x3e mapping failed: -22
> [    0.947793] ------------[ cut here ]------------
> [    0.947838] WARNING: at kernel/irq/irqdomain.c:485
>
> So this commit 583c8203dcb26b42cea81e4734ea926dae05dbb9 is causing
> the above kernel WARNING(found by git-bisect).
>
> As per suggestion by Alistair, Use OPAL event instead of interrupts
> to avoid the warning. Tested on RHEL and Ubuntu OS's, not seen any
> kernel warning's.
>
> [    1.745145] hvc0: raw protocol on /ibm,opal/consoles/serial@0 (boot console)
> [    1.745223] hvc0: No interrupts property, using OPAL event
> [    1.745556] hvc1: hvsi protocol on /ibm,opal/consoles/serial@1
> [    1.745622] hvc1: No interrupts property, using OPAL event
>
> Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
> ---
> Changes since v1:
>
> 	Use OPAL event instead of interrupts to avoid the
> 	kernel warning.
>
>  hw/fsp/fsp-console.c | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c
> index 6683679..2785a82 100644
> --- a/hw/fsp/fsp-console.c
> +++ b/hw/fsp/fsp-console.c
> @@ -929,10 +929,8 @@ void fsp_console_reset(void)
>
>  void fsp_console_add_nodes(void)
>  {
> -	struct dt_node *opal_event;
>  	unsigned int i;
>
> -	opal_event = dt_find_by_name(opal_node, "event");
>
>  	for (i = 0; i < MAX_SERIAL; i++) {
>  		struct fsp_serial *fs = &fsp_serials[i];
> @@ -951,10 +949,6 @@ void fsp_console_add_nodes(void)
>
>  		fs->irq = opal_dynamic_event_alloc();
>  		dt_add_property_cells(fs_node, "interrupts", ilog2(fs->irq));
> -
> -		if (opal_event)
> -			dt_add_property_cells(fs_node, "interrupt-parent",
> -					      opal_event->phandle);
>  	}
>  }
>
>
ppaidipe@linux.vnet.ibm.com May 4, 2017, 7:04 a.m.
On 2017-05-04 11:40, Alistair Popple wrote:
> Hi Pridhiviraj,
> 
> There were some subtlties here with different kernel versions that
> unfortunately I only vaguely recall. Which specific kernel versions
> and systems have you tested this on? Sam do you think this will cause
> issues on Firenze when there is data on the second serial console?
> 
> Regards,
> 
> Alistair


Hi Alistair
I am seeing this failure currently on Firenze systems with
RHEL 7.3 kernel 3.10.0-510.el7.ppc64le. So tested this on that
combination. And also tested on ubuntu 16.04/16.10 kernel's
likely 4.8/4.10 kernel versions.
on OpenPower systems the failure was fixed.
https://patchwork.ozlabs.org/patch/693518/


Thanks
Pridhiviraj


> 
> On Wed, 22 Feb 2017 11:32:42 AM ppaidipe@linux.vnet.ibm.com wrote:
>> From: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
>> 
>> This reverts part of commit 583c8203dcb26b42cea81e4734ea926dae05dbb9.
>> 
>> Below is the WARNING in pre 4.2 linux kernels which is raised in 
>> firenze
>> systems due to interrupts mapping failure.
>> 
>> [    0.947741] irq: irq-62==>hwirq-0x3e mapping failed: -22
>> [    0.947793] ------------[ cut here ]------------
>> [    0.947838] WARNING: at kernel/irq/irqdomain.c:485
>> 
>> So this commit 583c8203dcb26b42cea81e4734ea926dae05dbb9 is causing
>> the above kernel WARNING(found by git-bisect).
>> 
>> As per suggestion by Alistair, Use OPAL event instead of interrupts
>> to avoid the warning. Tested on RHEL and Ubuntu OS's, not seen any
>> kernel warning's.
>> 
>> [    1.745145] hvc0: raw protocol on /ibm,opal/consoles/serial@0 (boot 
>> console)
>> [    1.745223] hvc0: No interrupts property, using OPAL event
>> [    1.745556] hvc1: hvsi protocol on /ibm,opal/consoles/serial@1
>> [    1.745622] hvc1: No interrupts property, using OPAL event
>> 
>> Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
>> ---
>> Changes since v1:
>> 
>> 	Use OPAL event instead of interrupts to avoid the
>> 	kernel warning.
>> 
>>  hw/fsp/fsp-console.c | 6 ------
>>  1 file changed, 6 deletions(-)
>> 
>> diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c
>> index 6683679..2785a82 100644
>> --- a/hw/fsp/fsp-console.c
>> +++ b/hw/fsp/fsp-console.c
>> @@ -929,10 +929,8 @@ void fsp_console_reset(void)
>> 
>>  void fsp_console_add_nodes(void)
>>  {
>> -	struct dt_node *opal_event;
>>  	unsigned int i;
>> 
>> -	opal_event = dt_find_by_name(opal_node, "event");
>> 
>>  	for (i = 0; i < MAX_SERIAL; i++) {
>>  		struct fsp_serial *fs = &fsp_serials[i];
>> @@ -951,10 +949,6 @@ void fsp_console_add_nodes(void)
>> 
>>  		fs->irq = opal_dynamic_event_alloc();
>>  		dt_add_property_cells(fs_node, "interrupts", ilog2(fs->irq));
>> -
>> -		if (opal_event)
>> -			dt_add_property_cells(fs_node, "interrupt-parent",
>> -					      opal_event->phandle);
>>  	}
>>  }
>> 
>>

Patch hide | download patch | download mbox

diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c
index 6683679..2785a82 100644
--- a/hw/fsp/fsp-console.c
+++ b/hw/fsp/fsp-console.c
@@ -929,10 +929,8 @@  void fsp_console_reset(void)
 
 void fsp_console_add_nodes(void)
 {
-	struct dt_node *opal_event;
 	unsigned int i;
 
-	opal_event = dt_find_by_name(opal_node, "event");
 
 	for (i = 0; i < MAX_SERIAL; i++) {
 		struct fsp_serial *fs = &fsp_serials[i];
@@ -951,10 +949,6 @@  void fsp_console_add_nodes(void)
 
 		fs->irq = opal_dynamic_event_alloc();
 		dt_add_property_cells(fs_node, "interrupts", ilog2(fs->irq));
-
-		if (opal_event)
-			dt_add_property_cells(fs_node, "interrupt-parent",
-					      opal_event->phandle);
 	}
 }