Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2297085rdh; Sun, 29 Oct 2023 09:18:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGHc/8siFd72W9hxg66lLPvuiPx2LcS8rtAA1eoOzST5LFOh/DKbCBdtrWXpfM9HaQt0LvP X-Received: by 2002:a05:6a00:138f:b0:6be:287d:46d6 with SMTP id t15-20020a056a00138f00b006be287d46d6mr7504195pfg.33.1698596286980; Sun, 29 Oct 2023 09:18:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698596286; cv=none; d=google.com; s=arc-20160816; b=Mcd360SYtTOriEbkvrAGRhoTPCr1LgOUkG0NHqbopTGNqVjjROIBj0e9VfF7rY7pTO 03Kh8ropoHl9EABMQeKARTi3UaOvVfvrM0jlZuMKxZuBaYR7wGUo79DqFhU4yw7b3PwG YA80XwO8QtBv58gMK6HiDX+f8/rBxtJ7m4wxFCS+kRpf4pETMLX8CsG7cVy++3JAH2wO d5TrA+Yg9/fnrJYVPgBItZ4o51fFE/KSIrV3H6Y3kvLzai6rgu0Vs5rdt1zIw1H5rA+w 3n9ZpofSN5rkfMSXgBaXl06ZiRqFeI/mvErIQJeX0gS6qHwY1iQy/69O/udK75mqv902 QRFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=BSwGKbdNF11DbzCxY/XR2hLRNksrBPmNpLPEnF8Ar9M=; fh=0SN5KC2ExU1X1Qif3iJK1/BuI8IkQTvS+XdZ5mKD2to=; b=G9qLfY6w4W+OCXSEK5v9MjGrjCxHDXctF88rl1h12zB/BXV0D2Q0k6B8VQfR+JWioB eJZ9Ih4WU+YTEvR1d7I8p5XxER9jjQ6h0zZkFeK7s0z2iRP0c0K7krB+3elKV4xGQY5t X9wTk61xLgAHJV7AYYWmCAYHwgRo2OvI7/MlmUOYoQhpAjvL0hoZArkakhgfnH8jyyFG I0xws6UQD6u7hbqxm5jH+WYWfP7EMsIifEq5/E8PHmm6Ms6+hywO5r2MTa/5sQfovYLM CKkmDRPEmA4QT2zB/JB/d7jioiGhXOpAH7yGAKmsvsUOrOi21ys94rlu7Q9HdFJLbT7n hllQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-watchdog.org header.s=odk20180602 header.b=FiwAXl6c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=linux-watchdog.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id u9-20020a056a00158900b006be322191e1si3796608pfk.254.2023.10.29.09.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 09:18:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-watchdog.org header.s=odk20180602 header.b=FiwAXl6c; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=linux-watchdog.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 4E9C980628F2; Sun, 29 Oct 2023 09:18:04 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229689AbjJ2QR1 (ORCPT + 99 others); Sun, 29 Oct 2023 12:17:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42304 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229512AbjJ2QR0 (ORCPT ); Sun, 29 Oct 2023 12:17:26 -0400 Received: from www.linux-watchdog.org (www.linux-watchdog.org [185.87.125.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 129DFBA; Sun, 29 Oct 2023 09:17:23 -0700 (PDT) Received: by www.linux-watchdog.org (Postfix, from userid 500) id 734AC40A00; Sun, 29 Oct 2023 17:10:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 www.linux-watchdog.org 734AC40A00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-watchdog.org; s=odk20180602; t=1698595856; bh=K01uBZjOi6MJBggCB1PXyOP/1H5GeP1Q9SQyHlNOR9o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FiwAXl6cid4H//9jwshG3o0P+lziIRrfSk7HMNHElnfRGqIJ+kEj82SF9MWkReqmD lRxDl09YSMlRRd3BVsCCAICgp13QqRrE09MGmjrzTozlGeqxBYo9dVAO8awWOLFRcl Dtlti4dwJ76pOqmfT+yN8GyKNYaV+yDUn/QEmsVI= Date: Sun, 29 Oct 2023 17:10:56 +0100 From: Wim Van Sebroeck To: Guenter Roeck Cc: Darren Hart , linux-kernel@vger.kernel.org, Vanshidhar Konda , Wim Van Sebroeck , linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org Subject: Re: [PATCH] sbsa_gwdt: Calculate timeout with 64-bit math Message-ID: <20231029161056.GB5887@www.linux-watchdog.org> References: <7d1713c5ffab19b0f3de796d82df19e8b1f340de.1695286124.git.darren@os.amperecomputing.com> <1fae4d2c-4bc7-f169-7b84-501674a82ee4@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1fae4d2c-4bc7-f169-7b84-501674a82ee4@roeck-us.net> User-Agent: Mutt/1.5.20 (2009-12-10) X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Sun, 29 Oct 2023 09:18:04 -0700 (PDT) Hi Guenter, > On 10/14/23 02:12, Darren Hart wrote: > >On Tue, Sep 26, 2023 at 05:45:13AM -0700, Guenter Roeck wrote: > >>On Thu, Sep 21, 2023 at 02:02:36AM -0700, Darren Hart wrote: > >>>Commit abd3ac7902fb ("watchdog: sbsa: Support architecture version 1") > >>>introduced new timer math for watchdog revision 1 with the 48 bit offset > >>>register. > >>> > >>>The gwdt->clk and timeout are u32, but the argument being calculated is > >>>u64. Without a cast, the compiler performs u32 operations, truncating > >>>intermediate steps, resulting in incorrect values. > >>> > >>>A watchdog revision 1 implementation with a gwdt->clk of 1GHz and a > >>>timeout of 600s writes 3647256576 to the one shot watchdog instead of > >>>300000000000, resulting in the watchdog firing in 3.6s instead of 600s. > >>> > >>>Force u64 math by casting the first argument (gwdt->clk) as a u64. Make > >>>the order of operations explicit with parenthesis. > >>> > >>>Fixes: abd3ac7902fb ("watchdog: sbsa: Support architecture version 1") > >>>Reported-by: Vanshidhar Konda > >>>Signed-off-by: Darren Hart > >>>Cc: Wim Van Sebroeck > >>>Cc: Guenter Roeck > >>>Cc: linux-watchdog@vger.kernel.org > >>>Cc: linux-kernel@vger.kernel.org > >>>Cc: linux-arm-kernel@lists.infradead.org > >>>Cc: # 5.14.x > >> > >>Reviewed-by: Guenter Roeck > > > >Guenter or Wim, I haven't seen this land in the RCs or in next yet. Have > >you already picked it up? Anything more needed from me? > > > >Thanks, > > > > Sorry, I am suffering from what I can only describe as a severe case of > maintainer/reviewer PTSD, and I have yet to find a way of dealing with that. I can imagine what it is like. And I do know that if you wouldn't have been there, that I would have allready stopped being a maintainer. So I hope you can find the right cooping mechanisms. I also had to work non-stop the last 4 to 5 weeks and it was hell. So I wish you all the best. PS: picking up all patches that have your review-by tag on it as we speack. Kind regards, Wim.