Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4012848rwb; Sun, 30 Jul 2023 22:51:32 -0700 (PDT) X-Google-Smtp-Source: APBJJlG40SqRB5RGrxxeAphCd+rfcF7FVY7jLvv5x9dYTjrfYZKGLUujK/HgvoGKSPa2w1KZUOB+ X-Received: by 2002:a05:622a:148c:b0:40b:9015:7eee with SMTP id t12-20020a05622a148c00b0040b90157eeemr4617853qtx.8.1690782692197; Sun, 30 Jul 2023 22:51:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690782692; cv=none; d=google.com; s=arc-20160816; b=sFIRwNDf+AJgkTxoNmTsW7/oPz+7wIxcq1UvwQEb+ku39kVCl5+0F/VITbjzBMlYcz omG1UALNCkOzfeqaA7yR4++J28KAkHE2Wi4+uK4w4fhnuMsdTq8ZAv9dkt6u9lEFd4hR oYNTLZ7XWzxSHKuITf6vPi4n7izzJEpmzWIhkK19a62wa30TtDK0fBT8CJR1DkQKc5vH SLOFrDRV6N8GFggYbmrm3udio+EsCCtU2sssF4Ms3czpgtkwDfvX6shi/TJHc/FNLYpv O4KQJ0MO+Q/xeGsEiDKN2ISKHC6dYquuHnJ4aV+kZoktoxM9KFMj8NKt6IuOtPXOjwjT 3aIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=qS6uf/XiqQGA5whQzK0SU/oIv1vZpak4+7XOKoKZ2+8=; fh=ERdkzDZmeuAA25qER+rT+a2aFtGh2WXT3jpkS+TRArI=; b=qSWI/TPGSsh9pj+wVRKOiT3jYBWecT15lotutwTZCsTABZsaRwrJjRyuJX4i/FnI9y BQN8BPuimyxZHiMtIZwgwNadXdR23BEBICaIaEDb/iLDSCB3SE/u7SZpillQxHF/LAq+ MqID0kaI0MzfHI+VQdMpIU0z9/e3eCr0G//rAGyy08ZKBmoAKjycgbQEU/Y8lq4n+eL/ lOQRgbQXuvJFiwJuzMzPu98qMjlmKrkIiZuPriOThxcznaenTfwvvKSJdlgkRyS3wFoB iiiBGLCkUKfAZYGnnkD9Q366eaYSt5GCd6CPnTfjqhi3EsY6jNAHngyrspKRipa/mg84 RSfg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a656944000000b005347fcb7853si2246092pgq.140.2023.07.30.22.51.08; Sun, 30 Jul 2023 22:51:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229708AbjGaF3J (ORCPT + 99 others); Mon, 31 Jul 2023 01:29:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52324 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjGaF3I (ORCPT ); Mon, 31 Jul 2023 01:29:08 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 0F88EE5B; Sun, 30 Jul 2023 22:29:06 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id D136F809E; Mon, 31 Jul 2023 05:29:05 +0000 (UTC) Date: Mon, 31 Jul 2023 08:29:04 +0300 From: Tony Lindgren To: "Sicelo A. Mhlongo" Cc: linux-kernel@vger.kernel.org, linux-omap@vger.kernel.org Subject: Re: [PATCH] bus: omap_l3_smx: identify timeout source before rebooting Message-ID: <20230731052904.GB5194@atomide.com> References: <20230730202240.898519-1-absicsz@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230730202240.898519-1-absicsz@gmail.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Sicelo A. Mhlongo [230730 20:23]: > Identify and print the error source before rebooting the board due to an l3 > application timeout error, by delaying the BUG_ON. This is helpful when > debugging, e.g. via serial. Makes sense to try to show some information, but please see the question below. > diff --git a/drivers/bus/omap_l3_smx.c b/drivers/bus/omap_l3_smx.c > index bb1606f5ce2d..70f4903d5468 100644 > --- a/drivers/bus/omap_l3_smx.c > +++ b/drivers/bus/omap_l3_smx.c > @@ -170,11 +170,9 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3) > status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_0); > /* > * if we have a timeout error, there's nothing we can > - * do besides rebooting the board. So let's BUG on any > - * of such errors and handle the others. timeout error > - * is severe and not expected to occur. > + * do besides rebooting the board after identifying the > + * error source. > */ > - BUG_ON(status & L3_STATUS_0_TIMEOUT_MASK); > } else { > status = omap3_l3_readll(l3->rt, L3_SI_FLAG_STATUS_1); > /* No timeout error for debug sources */ > @@ -190,6 +188,12 @@ static irqreturn_t omap3_l3_app_irq(int irq, void *_l3) > ret |= omap3_l3_block_irq(l3, error, error_addr); > } > > + /* > + * BUG on application timeout errors since they are severe and not > + * expected to occur. > + */ > + BUG_ON(status & L3_STATUS_0_TIMEOUT_MASK); Aren't you now checking the bit for both L3_SI_FLAG_STATUS_0 and L3_SI_FLAG_STATUS_1 register values? I think it should be only for register L3_SI_FLAG_STATUS_0 value? Regards, Tony