From patchwork Tue Nov 22 05:19:13 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ppaidipe X-Patchwork-Id: 697550 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tNDKt00Sfz9t0p for ; Tue, 22 Nov 2016 16:19:30 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3tNDKs600xzDvt1 for ; Tue, 22 Nov 2016 16:19:29 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 3tNDKn2MWrzDvrf for ; Tue, 22 Nov 2016 16:19:25 +1100 (AEDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uAM5IpsX046162 for ; Tue, 22 Nov 2016 00:19:23 -0500 Received: from e23smtp01.au.ibm.com (e23smtp01.au.ibm.com [202.81.31.143]) by mx0a-001b2d01.pphosted.com with ESMTP id 26v7h1j3f3-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 22 Nov 2016 00:19:22 -0500 Received: from localhost by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 22 Nov 2016 15:19:20 +1000 Received: from d23dlp03.au.ibm.com (202.81.31.214) by e23smtp01.au.ibm.com (202.81.31.207) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 22 Nov 2016 15:19:19 +1000 Received: from d23relay07.au.ibm.com (d23relay07.au.ibm.com [9.190.26.37]) by d23dlp03.au.ibm.com (Postfix) with ESMTP id 8F58C3578053 for ; Tue, 22 Nov 2016 16:19:18 +1100 (EST) Received: from d23av05.au.ibm.com (d23av05.au.ibm.com [9.190.234.119]) by d23relay07.au.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id uAM5JIuf34013372 for ; Tue, 22 Nov 2016 16:19:18 +1100 Received: from d23av05.au.ibm.com (localhost [127.0.0.1]) by d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id uAM5JIlj013701 for ; Tue, 22 Nov 2016 16:19:18 +1100 Received: from localhost.in.ibm.com ([9.124.158.230]) by d23av05.au.ibm.com (8.14.4/8.14.4/NCO v10.0 AVin) with ESMTP id uAM5JHRA013645; Tue, 22 Nov 2016 16:19:17 +1100 From: Pridhiviraj Paidipeddi To: skiboot@lists.ozlabs.org Date: Tue, 22 Nov 2016 10:49:13 +0530 X-Mailer: git-send-email 2.7.4 X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16112205-1617-0000-0000-000001823779 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16112205-1618-0000-0000-00004734C995 Message-Id: <1479791953-16820-1-git-send-email-ppaidipe@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-11-22_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611220095 Subject: [Skiboot] [PATCH] Revert "fsp/console: Allocate irq for each hvc console" X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" 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 --- 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); } }