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.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,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 E2E41C4338F for ; Mon, 26 Jul 2021 12:06:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B673D60F38 for ; Mon, 26 Jul 2021 12:06:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233839AbhGZLZb (ORCPT ); Mon, 26 Jul 2021 07:25:31 -0400 Received: from david.siemens.de ([192.35.17.14]:48219 "EHLO david.siemens.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233738AbhGZLZa (ORCPT ); Mon, 26 Jul 2021 07:25:30 -0400 Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id 16QC5dFX005210 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 26 Jul 2021 14:05:40 +0200 Received: from [139.22.37.28] ([139.22.37.28]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 16QC5d4G009611; Mon, 26 Jul 2021 14:05:39 +0200 Subject: Re: [PATCH] watchdog: iTCO_wdt: Fix detection of SMI-off case To: Paolo Bonzini , Wim Van Sebroeck , Guenter Roeck Cc: linux-watchdog@vger.kernel.org, Linux Kernel Mailing List , Christian Storm , Andy Shevchenko , =?UTF-8?Q?Mantas_Mikul=c4=97nas?= , stable References: From: Jan Kiszka Message-ID: <0e37c448-26cc-7f4a-4f1a-598c595ce07e@siemens.com> Date: Mon, 26 Jul 2021 14:05:39 +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 14:03, Paolo Bonzini wrote: > 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: */ >> > > Reviewed-by: Paolo Bonzini > Cc: stable@vger.kernel.org > > (the latter because cb011044e34c has been picked up by stable kernels > already). > Thanks. Originally wanted to add stable myself, but I'm still unsure whether this is the privilege of the subsystem maintainer or should also be done by contributors. Jan -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux