[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(-)

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);
 	}
 }