Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp920312pxj; Fri, 21 May 2021 02:11:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyyzcPT6q/u03I0/1vp0hDEnGIgxanoFt+eW5Q4yhnUh8huafOx4XHpIE54RKwbxscMHptr X-Received: by 2002:aa7:d445:: with SMTP id q5mr10356433edr.330.1621588269663; Fri, 21 May 2021 02:11:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621588269; cv=none; d=google.com; s=arc-20160816; b=yKS6PjH7/FzAyOY1BvhkL0tSN5g0TPXlVygbPXos5cHm4uH8LP/wsAp/1jdEVhzyJX Ks6tKSYPIIk4Vtpxgjht0tt+BDqWWR6MPobFS7v+0MNhdcZlgqhOLoXsTqFEkUFDsE9I PlZ7gx9R7oRtEl5/S7s72/ZAjxh/XYSwggpgijuB3k/etgkvjJNKAuDMsQZGe493o4b6 RafXbFb58jKl2pw+sgbXTYTbcGuSi/bu1WkwLWX7XA4pU72Sk4afa3Z+gc3aYPNk9EX7 lJiO3JLY4pbmrM90SMhLK/2qlXg+JSM1EUg9qdJjEv2g3Iq7vcQ9zgceCjBTfHNukiXZ O/gA== 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; bh=TeR6dx8Rqr3ByExvzXzaPr3AoEZSg27P4QPA34TUl50=; b=JRUsq7f2arOvu/gtWFd/284NEPMxhEXMalhYT2KBIsIBK6ft0pSOrTFykbIdJGD7Ig mxsks+xQaCwtUE6Kiv+n8H3GJthl/FZf7djIelDon4coOtnkCsGZnHjpaOIpmweTDPby lXgccTHRvL7BXZvu1yu7VeoSOFVEsqR6Sn9UouBx6RkFbwhnFHXJd/VTnXxjKAm0Lllm fKetSbKDGrQHIgb02hgJm4mBW2YfJGoBqH7PviUJtft1gP7MRIlsKHWWlVGzlhSX5c0p 7osvIgZ1MQ2PgHjNx+lvf4JYvdFNrQqsdFKuuIe60ANddaxD3+o+NFclk9WOFwpxFaQQ oY4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MGywRptR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z4si5116851ejp.321.2021.05.21.02.10.46; Fri, 21 May 2021 02:11:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=MGywRptR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237845AbhEUBxX (ORCPT + 99 others); Thu, 20 May 2021 21:53:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237578AbhEUBxX (ORCPT ); Thu, 20 May 2021 21:53:23 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8FEE9C061574; Thu, 20 May 2021 18:52:01 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id s20so10123296plr.13; Thu, 20 May 2021 18:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=TeR6dx8Rqr3ByExvzXzaPr3AoEZSg27P4QPA34TUl50=; b=MGywRptRl4M03Loj0uWb0Q68foEF2W7FLLb6e2Y3yaSpAS41cQJOIlc+Yodwrt14+B o5A8zY9VfTUFffOgbb7ZCroEftruHMd3VvG0Xksws27jXojgM5CKt9ZQ5MknLgvgetlm Qozs9MN+rdGEoiOix5e5xIOU3ppyzW4RuIi+A7iMMzjkpBE9NtZLzOaIAVmamQr4RsCW ft1FDBQy++SQwvzxEx/ipWcZ+SL7sMpanfO1ViUsK6G98HM469/Z48/lA6lPpBAdNbQw bFaHu86UWSMGHMRuqp5UMqyqmk9RU9qLDXzaT4bnkhcZHGFh/CR3h1Z0NlgRXQu4zGzX CrCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=TeR6dx8Rqr3ByExvzXzaPr3AoEZSg27P4QPA34TUl50=; b=IUecRMNJnYtLlUTaCneIIz/sTzUtvFoIWR2jeBnotvFHJHDFHULTtTJP6w9mlRnxi5 gYhJge+6ayR7EQSTSL/eGGf/XL7PUrP8QBQeP/VLab7TPfiCcy/2W8YkNx8umhx+/WTo mpNW9Etrf8DNa+kZXaq2uOVxt+jjtpevOhrzgDsZhpTbXXdV1gd0jFn55RweIqhHZX1e lZ462EsVpdR60GUYYmj62e9aUjyLO+sdAA5aJMt66G9Ni/lOyvK8Ru0MX6i3Dig4voeq 9JGojU5dSL3ypwuIcCVkUpTCvhCHcKr8vFxLWdASzPJxxiGC0qpmDSMwY7puZfHDznIo 7gYA== X-Gm-Message-State: AOAM530ccbGZ8jV6J+YEDRPZnLGN4dhfVqY7yJ+c0zaAUnaNCDj9c1ZF QmRopnCSa6dwTRSbufihr0MCU95VIvaINJ9G X-Received: by 2002:a17:90a:4404:: with SMTP id s4mr8354235pjg.218.1621561921013; Thu, 20 May 2021 18:52:01 -0700 (PDT) Received: from taoren-ubuntu-R90MNF91 (c-73-252-146-110.hsd1.ca.comcast.net. [73.252.146.110]) by smtp.gmail.com with ESMTPSA id u6sm2538958pjy.51.2021.05.20.18.51.59 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 20 May 2021 18:52:00 -0700 (PDT) Date: Thu, 20 May 2021 18:51:53 -0700 From: Tao Ren To: Guenter Roeck Cc: Wim Van Sebroeck , Joel Stanley , Andrew Jeffery , linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, Tao Ren , Amithash Prasad Subject: Re: [PATCH] watchdog: aspeed: fix hardware timeout calculation Message-ID: <20210521015153.GA19153@taoren-ubuntu-R90MNF91> References: <20210417034249.5978-1-rentao.bupt@gmail.com> <20210417042048.GA109800@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210417042048.GA109800@roeck-us.net> User-Agent: Mutt/1.9.4 (2018-02-28) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Wim, Not sure if I looked at the wrong repository/branch, and looks like the patch is not included. Do you have any further suggestions? Or should I send out v2 in case it's missed? Thanks, Tao On Fri, Apr 16, 2021 at 09:20:48PM -0700, Guenter Roeck wrote: > On Fri, Apr 16, 2021 at 08:42:49PM -0700, rentao.bupt@gmail.com wrote: > > From: Tao Ren > > > > Fix hardware timeout calculation in aspeed_wdt_set_timeout function to > > ensure the reload value does not exceed the hardware limit. > > > > Fixes: efa859f7d786 ("watchdog: Add Aspeed watchdog driver") > > Reported-by: Amithash Prasad > > Signed-off-by: Tao Ren > > Reviewed-by: Guenter Roeck > > > --- > > drivers/watchdog/aspeed_wdt.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/watchdog/aspeed_wdt.c b/drivers/watchdog/aspeed_wdt.c > > index 7e00960651fa..507fd815d767 100644 > > --- a/drivers/watchdog/aspeed_wdt.c > > +++ b/drivers/watchdog/aspeed_wdt.c > > @@ -147,7 +147,7 @@ static int aspeed_wdt_set_timeout(struct watchdog_device *wdd, > > > > wdd->timeout = timeout; > > > > - actual = min(timeout, wdd->max_hw_heartbeat_ms * 1000); > > + actual = min(timeout, wdd->max_hw_heartbeat_ms / 1000); > > > > writel(actual * WDT_RATE_1MHZ, wdt->base + WDT_RELOAD_VALUE); > > writel(WDT_RESTART_MAGIC, wdt->base + WDT_RESTART); > > -- > > 2.17.1 > >