From patchwork Fri Oct 27 10:50:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasant Hegde X-Patchwork-Id: 831196 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 ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yNgf15b5xz9t2Z for ; Fri, 27 Oct 2017 21:51:05 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3yNgf13sKKzDrbm for ; Fri, 27 Oct 2017 21:51:05 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=hegdevasant@linux.vnet.ibm.com; receiver=) 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 3yNgdv0ny2zDqfh for ; Fri, 27 Oct 2017 21:50:58 +1100 (AEDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9RAo0It116304 for ; Fri, 27 Oct 2017 06:50:54 -0400 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2dv0y9fuv2-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 27 Oct 2017 06:50:54 -0400 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 27 Oct 2017 11:50:52 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 27 Oct 2017 11:50:51 +0100 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id v9RAopxX24051858; Fri, 27 Oct 2017 10:50:51 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F410CAE057; Fri, 27 Oct 2017 11:44:43 +0100 (BST) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 26967AE045; Fri, 27 Oct 2017 11:44:43 +0100 (BST) Received: from hegdevasant.in.ibm.com (unknown [9.109.222.221]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Fri, 27 Oct 2017 11:44:42 +0100 (BST) From: Vasant Hegde To: skiboot@lists.ozlabs.org Date: Fri, 27 Oct 2017 16:20:45 +0530 X-Mailer: git-send-email 2.9.3 X-TM-AS-GCONF: 00 x-cbid: 17102710-0020-0000-0000-000003C58ADA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17102710-0021-0000-0000-0000425A7225 Message-Id: <20171027105045.939-1-hegdevasant@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-10-27_05:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710270147 Subject: [Skiboot] [PATCH] FSP/CONSOLE: Disable notification on unresponsive consoles X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.24 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: sam@mendozajonas.com MIME-Version: 1.0 Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Commit fd6b71fc fixed the situation where ipmi console was open (hvc0) but got data on different console (hvc1). During FSP R/R OPAL closes all consoles. After R/R complete FSP requests to open hvc1 and sends data on this. If hvc1 registration failed or not opened in host kernel then it will not read data and results in RCU stalls. Note that this is workaround for older kernel where we don't have separate irq for each console. Latest kernel works fine without this patch. CC: stable CC: Sam Mendoza-Jonas Signed-off-by: Vasant Hegde --- hw/fsp/fsp-console.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/fsp/fsp-console.c b/hw/fsp/fsp-console.c index e3628d7..8d845d8 100644 --- a/hw/fsp/fsp-console.c +++ b/hw/fsp/fsp-console.c @@ -704,6 +704,7 @@ static int64_t fsp_console_read(int64_t term_number, int64_t *length, struct fsp_serbuf_hdr *sb; bool pending = false; uint32_t old_nin, n, i, chunk, req = *length; + int rc = OPAL_SUCCESS; if (term_number < 0 || term_number >= MAX_SERIAL) return OPAL_PARAMETER; @@ -712,8 +713,8 @@ static int64_t fsp_console_read(int64_t term_number, int64_t *length, return OPAL_PARAMETER; lock(&fsp_con_lock); if (!fs->open) { - unlock(&fsp_con_lock); - return OPAL_CLOSED; + rc = OPAL_CLOSED; + goto clr_flag; } if (fs->waiting) fs->waiting = 0; @@ -744,6 +745,7 @@ static int64_t fsp_console_read(int64_t term_number, int64_t *length, buffer[4], buffer[5], buffer[6], buffer[7]); #endif /* OPAL_DEBUG_CONSOLE_IO */ +clr_flag: /* Might clear the input pending flag */ for (i = 0; i < MAX_SERIAL && !pending; i++) { struct fsp_serial *fs = &fsp_serials[i]; @@ -772,7 +774,7 @@ static int64_t fsp_console_read(int64_t term_number, int64_t *length, unlock(&fsp_con_lock); - return OPAL_SUCCESS; + return rc; } void fsp_console_poll(void *data __unused)