[Skiboot] [PATCH] Revert "fsp/console: Allocate irq for each hvc console"

Pridhiviraj Paidipeddi ppaidipe at linux.vnet.ibm.com
Tue Nov 22 16:19:13 AEDT 2016


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

Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe at linux.vnet.ibm.com>
---
 hw/fsp/fsp-console.c | 26 +++++---------------------
 1 file changed, 5 insertions(+), 21 deletions(-)

diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c
index 0080d73..5e27197 100644
--- a/hw/fsp/fsp-console.c
+++ b/hw/fsp/fsp-console.c
@@ -55,7 +55,6 @@ struct fsp_serial {
 	struct fsp_serbuf_hdr	*out_buf;
 	struct fsp_msg		*poke_msg;
 	u8			waiting;
-	u64			irq;
 };
 
 #define SER_BUFFER_SIZE 0x00040000UL
@@ -194,7 +193,6 @@ static size_t fsp_write_vserial(struct fsp_serial *fs, const char *buf,
 #ifndef DISABLE_CON_PENDING_EVT
 	opal_update_pending_evt(OPAL_EVENT_CONSOLE_OUTPUT,
 				OPAL_EVENT_CONSOLE_OUTPUT);
-	opal_update_pending_evt(fs->irq, fs->irq);
 #endif
 	return len;
 }
@@ -467,7 +465,6 @@ static bool fsp_con_msg_vt(u32 cmd_sub_mod, struct fsp_msg *msg)
 		lock(&fsp_con_lock);
 		opal_update_pending_evt(OPAL_EVENT_CONSOLE_INPUT,
 					OPAL_EVENT_CONSOLE_INPUT);
-		opal_update_pending_evt(fs->irq, fs->irq);
 		unlock(&fsp_con_lock);
 	}
 	return true;
@@ -707,10 +704,8 @@ static int64_t fsp_console_read(int64_t term_number, int64_t *length,
 			}
 		}
 	}
-	if (!pending) {
-		opal_update_pending_evt(fs->irq, 0);
+	if (!pending)
 		opal_update_pending_evt(OPAL_EVENT_CONSOLE_INPUT, 0);
-	}
 
 	unlock(&fsp_con_lock);
 
@@ -746,14 +741,11 @@ void fsp_console_poll(void *data __unused)
 
 			if (!fs->open)
 				continue;
-			if (sb->next_out == sb->next_in) {
-				opal_update_pending_evt(fs->irq, 0);
+			if (sb->next_out == sb->next_in)
 				continue;
-			}
-			if (fs->log_port) {
+			if (fs->log_port)
 				__flush_console(true);
-				opal_update_pending_evt(fs->irq, 0);
-			} else {
+			else {
 #ifdef OPAL_DEBUG_CONSOLE_POLL
 				if (debug < 5) {
 					prlog(PR_DEBUG,"OPAL: %d still pending"
@@ -918,7 +910,7 @@ void fsp_console_reset(void)
 void fsp_console_add_nodes(void)
 {
 	unsigned int i;
-	struct dt_node *consoles, *opal_event;
+	struct dt_node *consoles;
 
 	consoles = dt_new(opal_node, "consoles");
 	dt_add_property_cells(consoles, "#address-cells", 1);
@@ -943,14 +935,6 @@ void fsp_console_add_nodes(void)
 				     "#write-buffer-size", SER_BUF_DATA_SIZE);
 		dt_add_property_cells(fs_node, "reg", i);
 		dt_add_property_string(fs_node, "device_type", "serial");
-
-		fs->irq = opal_dynamic_event_alloc();
-		dt_add_property_cells(fs_node, "interrupts", ilog2(fs->irq));
-
-		opal_event = dt_find_by_name(opal_node, "event");
-		if (opal_event)
-			dt_add_property_cells(fs_node, "interrupt-parent",
-					      opal_event->phandle);
 	}
 }
 
-- 
2.7.4



More information about the Skiboot mailing list