From patchwork Thu Dec 7 06:12:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mukesh Ojha X-Patchwork-Id: 13482696 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 10518C4167B for ; Thu, 7 Dec 2023 06:13:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=5TS34gkzXruUhG8FEs90liTLuLFyffSJKnHvtO4d2gI=; b=2FW3FEDA7Dcnbl e8smsLCfCErS1f2WWPCw/sIRVD2qdeRfci8btMiN/blccz5BBjgyJlyE04wmla2rxur3QlYkeCxaa sj0Lidt26JXylQcXOG4/ewU/msWbz1wl2tZvLg6Yt6UjvGenTTDwvWjd7FDvurFrsmv8W1+UO+Sn7 Byn5tC+Xon2TNFZfDTW1kScrZ5PXpPbcAnUIIlS6dO9EbqKhoX6OnE0wRBSItOburTuTQPvFd4hIm lhfaHK0SRwo+LyezNS+B7KxM5A9I8mD/G29kOItfCO8JXgRo400P0To5rCth2wMWTxaE8+k5E6G+F QTWsdqdLQCeFYInTmRgw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rB7dY-00BxSl-2B; Thu, 07 Dec 2023 06:13:28 +0000 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rB7dT-00BxSH-2X for linux-arm-kernel@lists.infradead.org; Thu, 07 Dec 2023 06:13:26 +0000 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B750H5t016959; Thu, 7 Dec 2023 06:13:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=qcppdkim1; bh=Be9AaPHiwgw7dqeDBcxJMS8N3AdgUhsl7NDlIBaX1GQ=; b=nzGhbbbXQt5y9rFTCY+FoFxRki6j9hlGX3VVtx16e0IUmHNGQigsP8DUmSjY/Z29fS6J mE7qr/R2tCg2Np5sVxTxznvAyIbp6CfnbJ5MfsnoWZ3uLBFydGuI5fyKT32dgNcDcwdW 86T+NMFomDAgURux58JJfwPCCqS7thcdH2m/JfprTUqLn2yddfYoXHrMW69TJXOI1BUb wk3hdX1D9XByS7wcuNG0uA+Hr1ki7/prj32W2ZuCb0t6o7G+wDPt2wNk0UkQXRPNJRFd xoVh5dvELh8K7Blj8bWVHK9Sl1fm2kt1qo8ky1QbbDKgNsKqI3d4LoVB1FABdVdu0nzM Iw== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uu6qr06xj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 Dec 2023 06:13:03 +0000 Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 3B76D3mX019860 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 7 Dec 2023 06:13:03 GMT Received: from hu-mojha-hyd.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.40; Wed, 6 Dec 2023 22:13:01 -0800 From: Mukesh Ojha To: , CC: , , Mukesh Ojha Subject: [PATCH] irqchip/gic-v3-its: BUG_ON if stall bit is set Date: Thu, 7 Dec 2023 11:42:39 +0530 Message-ID: <1701929559-18252-1-git-send-email-quic_mojha@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: mHe2797qgUJBhuFjqGU3m_Wf5mtznhYB X-Proofpoint-ORIG-GUID: mHe2797qgUJBhuFjqGU3m_Wf5mtznhYB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-07_03,2023-12-06_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 adultscore=0 mlxscore=0 bulkscore=0 mlxlogscore=949 priorityscore=1501 malwarescore=0 impostorscore=0 spamscore=0 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312070047 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231206_221323_848701_BBF19896 X-CRM114-Status: GOOD ( 18.63 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There could be various reason that stall bit could be set due to software errors while processing commands in command queue is being processed and waiting for 1s is not going to help in debugging as command processing anyways going to be timed out and system will continue to run and may crash after some time due to this. So, to debug such issues what command caused the stall bit to set, BUG_ON right away. Signed-off-by: Mukesh Ojha --- drivers/irqchip/irq-gic-v3-its.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 9a7a74239eab..8983e0a3318c 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -1078,6 +1078,11 @@ static int its_wait_for_range_completion(struct its_node *its, s64 delta; rd_idx = readl_relaxed(its->base + GITS_CREADR); + /* + * Check for stall bit as there is no point in waiting + * for 1s if the stall bit is already set. + */ + BUG_ON(rd_idx & 1); /* * Compute the read pointer progress, taking the