Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1491202pxb; Fri, 20 Aug 2021 06:49:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy57CA8w8cfVrbXHW6D6mkj/dg007eShU5bF9NE+8JZmt3IeIABoNVgcNFFC2xF+qyRqcuL X-Received: by 2002:a05:6402:375:: with SMTP id s21mr23129275edw.318.1629467375627; Fri, 20 Aug 2021 06:49:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629467375; cv=none; d=google.com; s=arc-20160816; b=VhJUeSWemn7InZTh30EvJW8CI5zmSn0dT06IR1MV3qeqU1AGuzIiTda2T+FybnnYnD bGyPgEK3g0wKyFe8cosGKbCndjt16be9DNJ6izcosfRrkI0l6SXSttcfiWZZUpebP156 3lJBMfLI10ZJD8pr/yx/bWyG0aoDpWi4SDNCmo8TimxONy+5fYDQZa8kmvOWUcfJIGH3 HrF6VC9HxqEELWQ2EcgptfxiCFQ50gfNjsZskFcxxRGiiR5iqGJCRJYPDfHDIOhUEHZ9 IGxNktX5Cg5xV5j6p6onXT0pxu0UyKo6OdQYPv4I+eHXDttaaxKMUfVrDBBJN9xTFYFP nlOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:from:subject; bh=Wp5voXM2RHp3eoT7CsDpiJMoPRdABTSdrdREEIHw2zY=; b=rhs/X0voYToRoGq44IXdqRPsRKZng2ByHFUe9jIUVBdmhNq+NOM5J3oeZXvyBcYC6H ZqQxAd2VgfdZeNUavkAJt4iGX1CysuDhPYHjDKHCEfiBXURHsJdcTNlvNG/5WuK0wu5k gaYWZFhx7jovbzQGq3kbooU0pWqLEMgNBMxoqvtY8nbE7RSSr4ICYy3zrdZn3WRBHvn+ XsaFWtSJTeD3+nYUC6ZVlNXfhjtwFcxjIH3ISbGpsbNmQYzvJxUCa01/B2sis0mGpnrs miJeD5MemGYm/h82ZctoTDPhYnu7VYY8T/QpVx/KRdloijmRqlfML0xUH2ZiCpydS+FY BOiw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 18si6110509edx.190.2021.08.20.06.49.06; Fri, 20 Aug 2021 06:49:35 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240765AbhHTNqG (ORCPT + 99 others); Fri, 20 Aug 2021 09:46:06 -0400 Received: from thoth.sbs.de ([192.35.17.2]:42417 "EHLO thoth.sbs.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232209AbhHTNqF (ORCPT ); Fri, 20 Aug 2021 09:46:05 -0400 Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by thoth.sbs.de (8.15.2/8.15.2) with ESMTPS id 17KDj7Ds007907 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 20 Aug 2021 15:45:07 +0200 Received: from [167.87.0.29] ([167.87.0.29]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 17KDj6ZU022537; Fri, 20 Aug 2021 15:45:06 +0200 Subject: Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case From: Jan Kiszka To: Wim Van Sebroeck , Guenter Roeck Cc: linux-watchdog@vger.kernel.org, Linux Kernel Mailing List , Paolo Bonzini , Christian Storm , Andy Shevchenko , =?UTF-8?Q?Mantas_Mikul=c4=97nas?= References: Message-ID: <1444efd5-b778-949b-34e8-99d2541350e9@siemens.com> Date: Fri, 20 Aug 2021 15:45:06 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 26.07.21 13:46, Jan Kiszka wrote: > From: Jan Kiszka > > Obviously, the test needs to run against the register content, not its > address. > > Fixes: cb011044e34c ("watchdog: iTCO_wdt: Account for rebooting on second timeout") > Reported-by: Mantas Mikulėnas > Signed-off-by: Jan Kiszka > --- > drivers/watchdog/iTCO_wdt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c > index b3f604669e2c..643c6c2d0b72 100644 > --- a/drivers/watchdog/iTCO_wdt.c > +++ b/drivers/watchdog/iTCO_wdt.c > @@ -362,7 +362,7 @@ static int iTCO_wdt_set_timeout(struct watchdog_device *wd_dev, unsigned int t) > * Otherwise, the BIOS generally reboots when the SMI triggers. > */ > if (p->smi_res && > - (SMI_EN(p) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN)) > + (inl(SMI_EN(p)) & (TCO_EN | GBL_SMI_EN)) != (TCO_EN | GBL_SMI_EN)) > tmrval /= 2; > > /* from the specs: */ > Ping, this is still missing in master. Stable kernels had the revert, but 5.14 will need this. Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux