From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A7EDC433ED for ; Sat, 17 Apr 2021 04:23:11 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 47BF06108F for ; Sat, 17 Apr 2021 04:23:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 47BF06108F Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=roeck-us.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=T4Bc0o+ls+bcukiPScD84iEYurUXTTN9RzUBnwgghlE=; b=fcT7AbuhBij/CA7oX673TGt4G VkccQHNDkVY/d5dJKEGh25S4juaMvcg0oP8GI9kmptNrglrNjqjC84IW2TvPcXhOJt+Vb3wFg7Jh1 JfUV/WDRYKIp5fyFQtOE6z4DRuo/9esgKSjaCKfzXTgjddefBlB0lziwyOtfBWtLnss7oYDk/Abwl mER13Udc7nCp3QBOBQMXAo7GSDrOmWYilPEUQuk4Uf+BZDfcFC98/blrpaadX9NpFyPRccDwclQEV 6vZBTs6HuQ/4iG6/8Q33gBG8CvELJh/F7zrUAZ/Azks2+id2nXIgi2XTF1Gl0KpopA2d9sHkQDsck 1+9FPcJvQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lXcS2-004HhS-2E; Sat, 17 Apr 2021 04:20:58 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXcRy-004HgZ-Lj for linux-arm-kernel@desiato.infradead.org; Sat, 17 Apr 2021 04:20:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=Yf4cGa1gDUioK7Tp5qZNGmRyNKmLAms5q26b5QKwv4I=; b=aWJWCCQQ8uJtRKT6d0c0Xhs4rd yUTk2e5XP6Pk62mtd0jSvRv1I0UAeG41op9jZcCUIjZNyI2r6Q6nRhwtyqChNBAqh/E9QJL86h1Gf 8IBFhewneBlE+OKi9FnCZoZBMq2QU37lDpseqH+HMQdFLLJWiS4KrxsX0osewt0moGuW8tbi6a/CI B6aWOFer9qTv1wra+nKxNO1QlXynXlNyG3uixzPbi7rF3BLcPn4DChX6rj8xCAX4Atkk5saRYgYQh tEPzFFU2QX4KU9rwvNZjGchkFwQXh74PzQr+syHmOEW9lPDeAeh1kCHlIm0M4t/Uz/LLDHGSAaaNm Jf61Eevg==; Received: from mail-oi1-x233.google.com ([2607:f8b0:4864:20::233]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lXcRw-009rKQ-0b for linux-arm-kernel@lists.infradead.org; Sat, 17 Apr 2021 04:20:53 +0000 Received: by mail-oi1-x233.google.com with SMTP id l131so24921431oih.0 for ; Fri, 16 Apr 2021 21:20:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Yf4cGa1gDUioK7Tp5qZNGmRyNKmLAms5q26b5QKwv4I=; b=piQInaLBoIAceOzFkrF0BoCeDSvSZtOAd8AiEd43+fyfVbehfg9SI7YxxzSHizd1xk 76N94AEBwmsNbyaM0xNh7YAmEMg6EBFyU3J9+3p5gxmSXeo8eiMdOrMj/xb88dPk4Oy4 fInFcdW9LXm29s0pPouGUFfihn0wmDNyptLw3JMhglRHeukM/2WtNI/yowPcNbkc5coE kSOTsXPHDhq9aBPe06d4kiCIyRVkqR/e6aiWCJaLBOQG3rFP7hJVB07fW/tsYdtbOc0J mshqqYuvvk5FCkcw8uzD68QKqCRbUvTIgsCDDdzVfyfEjjSF5brz7IqljNzUSYRKiOP9 jDeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=Yf4cGa1gDUioK7Tp5qZNGmRyNKmLAms5q26b5QKwv4I=; b=EDc19rvkrsKmh+66lRUaOMWnA3IECJh7oiGAr3ND/PTkWsyj5hR9yDYPUu74n+covM XgWDCUYXHc6sZDWFtu/RuO86bwy8FkkE+8lkg39wR8PybAe2q8IruHP0uXKoh+utApj4 scnXCH9m5z3B7ggsNvj2zxrrjJzpMmec0xtICABqhEOBD3w3zenS26GoRb+eff2Mvx48 6ciPksLE9OaD5hTTO475OOhVlR04Afoidh0tWPIcDwzUK2DfDhm5m63ZHZLcwzBJ5ZpF CMc7ppIq9dOexEEz0GYXui3EcpIWQ4qR/0AtCtQ2K+Z1jVzJb1WIuEDak4eOvpCC3671 zaRA== X-Gm-Message-State: AOAM531axUNIVhSaVN4+DcMz7oSYzWGVIa/UaRLzAa2oUeAzFSrzHJIM wa+yAzDYKbBK0xs8ZfY/ngQ= X-Google-Smtp-Source: ABdhPJxAT7odgGlh+hNxttap8x0zum9s/e3YiZYiZCZNA4kSTGiSQQY4Cn2fQzPSS4tsk9DfBcifFQ== X-Received: by 2002:aca:a990:: with SMTP id s138mr9144164oie.80.1618633250989; Fri, 16 Apr 2021 21:20:50 -0700 (PDT) Received: from localhost ([2600:1700:e321:62f0:329c:23ff:fee3:9d7c]) by smtp.gmail.com with ESMTPSA id h184sm1866764oia.1.2021.04.16.21.20.49 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 16 Apr 2021 21:20:50 -0700 (PDT) Date: Fri, 16 Apr 2021 21:20:48 -0700 From: Guenter Roeck To: rentao.bupt@gmail.com 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: <20210417042048.GA109800@roeck-us.net> References: <20210417034249.5978-1-rentao.bupt@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210417034249.5978-1-rentao.bupt@gmail.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210416_212052_100133_A9AEE8B6 X-CRM114-Status: GOOD ( 16.88 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel