Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp2312375rdh; Sun, 29 Oct 2023 10:01:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEARZstoDyDDKNNOC4wZFuefSqscHvvDqnXMlBYb7Ohama1mV/zO4O5Fe1H/ATdMAH+iAPV X-Received: by 2002:a05:6a20:8424:b0:17b:3917:ad39 with SMTP id c36-20020a056a20842400b0017b3917ad39mr12054007pzd.48.1698598875436; Sun, 29 Oct 2023 10:01:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698598875; cv=none; d=google.com; s=arc-20160816; b=egrTNSm5ms/gCrG5pQdkExEFA/Wt20BH/2obeErxdFxLokiYHsuurlbH5AQsAofwR1 YNJqVrx80YZm57BVyYlDOKz3D+r+irwb+D1gFRQhKrk6WJ4klxFMHpnOn0JFvVjrWZ7p YPL2rR5urb4J2xrY1/FMv0jc5av9w5MTiCq0u0QNI3CPntkAnSmSu35KQG+jqPbjqC73 0X3UyRcK3UDwcSuafBIMk+2gPGqe9QvOWYWC1zIVK/t2yxRzrw91xGYPbTN2JiY46UbZ mobP5I2MNUzjciQlVMul6W3n+6FY5vM3lRAc2FMiPo8XZ5g95PmLjaK6T7ZMK+Nf0WoJ piVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:cc:to:content-language:subject:user-agent :mime-version:date:message-id:sender:dkim-signature; bh=+GH3Ep1QSotLQp9G1VgYYbvlYhIk5BNHjZEa/6Fuf0I=; fh=pOsgxo0cxG11dOKlmNsnQyrWvUIfsY1PK5MgTQzG5B8=; b=LqT+KENl52ghI/JSx095Khq/ahwDEHMsPvFHXRkiZ0DbQ5mmQJG++8Jn9RtaDYRqJE NFfo9D3PhjfkWa7obTZm6IFUyem8XJEx6mFbTY1UVeoubwddwpFjTrlgIvckB0D7/Z4c OsPkvjcSloqiNDunh8te+REXY/uRaNr6CQ+XWc64pCQADu+7khkTbLmX50FP09aUtyHo QbGVEFMGkBqFKzVp5/NeBgGYtjD/cWcdDoPDsJV4wzBmYeP6k80aflDlicyRlSscYwPy 8Vi4wJqZl6gQRcninWGLfb0VsA1Vvciv8kdNMcD+w+5btkGr8Hoo52YFFXNjlKP5CEEb 2Ttg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=R3SVR8ga; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id k131-20020a636f89000000b005b34179728esi3864615pgc.237.2023.10.29.10.01.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Oct 2023 10:01:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=R3SVR8ga; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 678038063BF8; Sun, 29 Oct 2023 10:01:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230185AbjJ2RA7 (ORCPT + 99 others); Sun, 29 Oct 2023 13:00:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229487AbjJ2RA6 (ORCPT ); Sun, 29 Oct 2023 13:00:58 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21B0CBE; Sun, 29 Oct 2023 10:00:56 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id d9443c01a7336-1c87a85332bso32598505ad.2; Sun, 29 Oct 2023 10:00:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698598855; x=1699203655; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=+GH3Ep1QSotLQp9G1VgYYbvlYhIk5BNHjZEa/6Fuf0I=; b=R3SVR8ga+9WN303P1EgNb8xLXnlnMabZfeIm/jG8mWDb/cc6hOy0PnaenN9g94AYak mqJgwKTYmZK0bOjy7qsUj/2aurk/R9bITxDPn8IiF2QLeXuBU1unuo2RLjXtrNTmjFKT +TL2O02W/PiEbaYY/8YmsMoTq/2UJ7x+Vvl1EUCZmIqYtzqArGcYj76nQ/LsZfxLV1tB QdAnFBJkH1B++LechmThrqjbHkwAi7NzkZ+yqMVy220/plQTNl1s/FxiKb5jQ6hoy/uB nxXdud5Pa+Jpky4H9BbBtowrM1yUAPzeVOxZRegGSuL5Dpj+hxsHRcnTptQg6jf94Ebe 2gPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698598855; x=1699203655; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:cc :to:content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=+GH3Ep1QSotLQp9G1VgYYbvlYhIk5BNHjZEa/6Fuf0I=; b=BVLE0pohj8HfMA1NyRMxVLex2GVfmiK2wwq7Gy4z4zG+v8t1LGY5XT9UFyiVgJuBzE b5w4BP9VbEETRW/zN2ZZmUL0XcFnmGaglLabcjDW548EoyeXk5hu/2IkjNxY9Kj8XQqj qWafcdWuBj5XT8wdPJOl9/NRk99+xgOTKuzzrN+3HYS6ej1tVPe5Izx6EVV6xkynER7N u2QNXk5He7nnszo7eTAvv3jHiFVeNWJMmDhCXnj+bnR/wxzsT8dkxAxG+fY65m3XKL0d NjXKQJ01DqyDMZHp4uYNvPJq/XPF3FaS5+hDS325wgZLi8iG8jlIgK4Ol+1G/ujcVPFr H0tQ== X-Gm-Message-State: AOJu0YwTf9DltELccnUgKSN5r0Eyz4TKhcTe6OM4QZOFurX1Mny1bror KC/SaJFdZKi12tlC6KBxAVo8VjnkLtc= X-Received: by 2002:a17:902:e84b:b0:1cc:4559:f5 with SMTP id t11-20020a170902e84b00b001cc455900f5mr1628124plg.14.1698598855567; Sun, 29 Oct 2023 10:00:55 -0700 (PDT) Received: from ?IPV6:2600:1700:e321:62f0:329c:23ff:fee3:9d7c? ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id ja18-20020a170902efd200b001bb892a7a67sm2989381plb.1.2023.10.29.10.00.54 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 29 Oct 2023 10:00:55 -0700 (PDT) Sender: Guenter Roeck Message-ID: <750ec6f7-f075-4075-ba9d-eb67f69239ec@roeck-us.net> Date: Sun, 29 Oct 2023 10:00:54 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] sbsa_gwdt: Calculate timeout with 64-bit math Content-Language: en-US To: Wim Van Sebroeck Cc: Darren Hart , linux-kernel@vger.kernel.org, Vanshidhar Konda , linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, stable@vger.kernel.org References: <7d1713c5ffab19b0f3de796d82df19e8b1f340de.1695286124.git.darren@os.amperecomputing.com> <1fae4d2c-4bc7-f169-7b84-501674a82ee4@roeck-us.net> <20231029161056.GB5887@www.linux-watchdog.org> From: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bnvBtiw7GchKKri2gDhRb2QNNDyBnQn5mRFw7CyuFclAksOdV/sdpQnYlYcRQWOUGY HhQ5eqTRZjm9z+qQe/T0HQpmiPTqQcIaG/edgKVTUjITfA7AJMKLQHgp04Vylb+G6jocnQQX JqvvP09whbqrABEBAAHCwWUEGAECAA8CGwwFAlVcpi8FCRmg08MACgkQyx8mb86fmYHNRQ/+ J0OZsBYP4leJvQF8lx9zif+v4ZY/6C9tTcUv/KNAE5leyrD4IKbnV4PnbrVhjq861it/zRQW cFpWQszZyWRwNPWUUz7ejmm9lAwPbr8xWT4qMSA43VKQ7ZCeTQJ4TC8kjqtcbw41SjkjrcTG wF52zFO4bOWyovVAPncvV9eGA/vtnd3xEZXQiSt91kBSqK28yjxAqK/c3G6i7IX2rg6pzgqh hiH3/1qM2M/LSuqAv0Rwrt/k+pZXE+B4Ud42hwmMr0TfhNxG+X7YKvjKC+SjPjqp0CaztQ0H nsDLSLElVROxCd9m8CAUuHplgmR3seYCOrT4jriMFBtKNPtj2EE4DNV4s7k0Zy+6iRQ8G8ng QjsSqYJx8iAR8JRB7Gm2rQOMv8lSRdjva++GT0VLXtHULdlzg8VjDnFZ3lfz5PWEOeIMk7Rj trjv82EZtrhLuLjHRCaG50OOm0hwPSk1J64R8O3HjSLdertmw7eyAYOo4RuWJguYMg5DRnBk WkRwrSuCn7UG+qVWZeKEsFKFOkynOs3pVbcbq1pxbhk3TRWCGRU5JolI4ohy/7JV1TVbjiDI HP/aVnm6NC8of26P40Pg8EdAhajZnHHjA7FrJXsy3cyIGqvg9os4rNkUWmrCfLLsZDHD8FnU mDW4+i+XlNFUPUYMrIKi9joBhu18ssf5i5Q= In-Reply-To: <20231029161056.GB5887@www.linux-watchdog.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, 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 lipwig.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 (lipwig.vger.email [0.0.0.0]); Sun, 29 Oct 2023 10:01:12 -0700 (PDT) On 10/29/23 09:10, Wim Van Sebroeck wrote: > 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. > Thanks, Guenter