Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp451245pxt; Fri, 6 Aug 2021 06:05:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJytZLj9EwUu/N+YCf4ZHdLLgG066AzvGPoISfG/NHidyXUhjv7YH07rh4HWsyIwcYc4+5YQ X-Received: by 2002:a02:94e2:: with SMTP id x89mr9671865jah.99.1628255158797; Fri, 06 Aug 2021 06:05:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628255158; cv=none; d=google.com; s=arc-20160816; b=H7jaI60k+tr2OQGuACPivmwz2v7YSLpk4FGIFfofBLFeuL7CKx6GprlVWBXDz7BagW GXuwTMD/zjUPJker/I3EIvd2M/7jTGtycLV/hY6WGlcpzIvci+GvlXjYJcYEkQrnehFe 9hmyLbxfSfmYfPrGrbSruYSgJirNrDL2KeKePOBf5QO7LeuUDlK/KElHDGwKcdwPoXE/ m5iAeGew/atG4RhnDvihEy6IeSuXngqtEgq7QB0F+fjEyyozOzDwBxYus4oT8BqUiYLw LRNQDgsYf+xTqniGsSipgXP6aNmnyQBepajxYWEU9WEr/TaySWTYW6Mqh1AIASeX4EHQ GWIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=x/14q6/ZesO8e9vP2dAkZccwILRyFwXIndMSJlhD9tY=; b=po2FLDbSkomWUOhaIBQZoyIXm4dc2saqY2CIWXAG+kZm4vWNqH+tvIRzESsH5tzQ9/ 1S9sf9c6qPsa9V4aQOUxbR0UXqsRTXL6z/JAWFkboJzQPMtFmEQTJc/kvkE2Tkgb7RLG wesGDMaGQBrTrIo2n1dh7rkdjNit3P350D8BpoPYCiVSDlZLFJtggOcll6Ih4jq5Hh4V VEZxVo5mMqMa5wiIrSYJlmpJXZpht5qN4VofOHZ2IKRXl34kj7QwATkv56xErz9X4ug+ m6nuTCUgiHEjQ9Ndf+7976TtC63fePnFcFj0meDS+wA4cNQhH4fWb/dv0stQ+QjjlxwH PlBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="jsjKYd/0"; 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=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a9si667790jat.116.2021.08.06.06.05.45; Fri, 06 Aug 2021 06:05:58 -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=@linuxfoundation.org header.s=korg header.b="jsjKYd/0"; 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=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244033AbhHFIQp (ORCPT + 99 others); Fri, 6 Aug 2021 04:16:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:45724 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243754AbhHFIPs (ORCPT ); Fri, 6 Aug 2021 04:15:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5A30A611EF; Fri, 6 Aug 2021 08:15:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628237730; bh=vL86lfOE7JC3lJEcAvz+Tt8sBvNAnOM7RLXKepKXRr4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jsjKYd/0V20U1LZpMT9fAJycjoBZWzTVCrlajqmp6PzOilAuSW3HybVjkyMyPaG6M epfb0YyLwABFzSnO6oxiBZz9MQCY20PZrWQfal/mjLoWeFuel9N/kYH7Vz4uQq8e1f G3Alq+rrKlbSLljFeESvI7WIN8Dfx0AA1ORJXT20= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jean Delvare , Jan Kiszka , Guenter Roeck , Wim Van Sebroeck , Sasha Levin Subject: [PATCH 4.14 11/11] Revert "watchdog: iTCO_wdt: Account for rebooting on second timeout" Date: Fri, 6 Aug 2021 10:14:54 +0200 Message-Id: <20210806081110.877458732@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210806081110.511221879@linuxfoundation.org> References: <20210806081110.511221879@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman This reverts commit cb1bdbfad648aa32c43bec6ef6d03e1c9d434393 which is commit cb011044e34c293e139570ce5c01aed66a34345c upstream. It is reported to cause problems with systems and probably should not have been backported in the first place :( Link: https://lore.kernel.org/r/20210803165108.4154cd52@endymion Reported-by: Jean Delvare Cc: Jan Kiszka Cc: Guenter Roeck Cc: Guenter Roeck Cc: Wim Van Sebroeck Cc: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/watchdog/iTCO_wdt.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) --- a/drivers/watchdog/iTCO_wdt.c +++ b/drivers/watchdog/iTCO_wdt.c @@ -75,8 +75,6 @@ #define TCOBASE(p) ((p)->tco_res->start) /* SMI Control and Enable Register */ #define SMI_EN(p) ((p)->smi_res->start) -#define TCO_EN (1 << 13) -#define GBL_SMI_EN (1 << 0) #define TCO_RLD(p) (TCOBASE(p) + 0x00) /* TCO Timer Reload/Curr. Value */ #define TCOv1_TMR(p) (TCOBASE(p) + 0x01) /* TCOv1 Timer Initial Value*/ @@ -332,12 +330,8 @@ static int iTCO_wdt_set_timeout(struct w tmrval = seconds_to_ticks(p, t); - /* - * If TCO SMIs are off, the timer counts down twice before rebooting. - * 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)) + /* For TCO v1 the timer counts down twice before rebooting */ + if (p->iTCO_version == 1) tmrval /= 2; /* from the specs: */ @@ -499,7 +493,7 @@ static int iTCO_wdt_probe(struct platfor * Disables TCO logic generating an SMI# */ val32 = inl(SMI_EN(p)); - val32 &= ~TCO_EN; /* Turn off SMI clearing watchdog */ + val32 &= 0xffffdfff; /* Turn off SMI clearing watchdog */ outl(val32, SMI_EN(p)); }