Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp2609818ybf; Mon, 2 Mar 2020 12:06:59 -0800 (PST) X-Google-Smtp-Source: ADFU+vsAfI8wC6cmdKD3ti0lMB3RvtHz0vF4D5ZxapE4XN6OOYyDZkAGlEmI3RtIHnfbhulflhNE X-Received: by 2002:aca:d903:: with SMTP id q3mr115935oig.12.1583179619725; Mon, 02 Mar 2020 12:06:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583179619; cv=none; d=google.com; s=arc-20160816; b=KAuJy4ZrWEE/nCeZbcRizo7eU1UFs9XaMfr7BJgzQpp2zPXHDvCs9LJV4ikkOUjfpK 9zAknP+RtKgN+az4dEXlVVVE/giBaQemh7zUYvhcjlPV8ODIGtUPbx+38/fXjtPt2BWW tp9Wy6KYjqPtPnyvr40Rloj1z4Tw8+J9bf2Nl49J+8a90Yq9XiosNBDtnhih5rU/vHf+ jJ8gDAd5Mpr7CDdcTmU6tiq22Zo3fHtM8o7vdiASPahclzAqALVacsMLql29J6qCC9UW 6r7d/Is9IhFgacveJBYvdGACeu07tYa8Igd5xpXS6fPG0b6gTynEnACsh5g/bSMOfWbR hXkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=WgwGOwOgqI6sh/GvST+Ydk6b4mvZqddNhr33TlV/TRE=; b=X9Z6xM8Wu/RTuMePPoaClgngeiyjHHBODGXrt0dcNrvOAFvIvbVSCZf7IJnyLaneqZ dYF5HaADjj3cQL49bXfZ3e464+JziOlAEdM5K3cqm/6/NP//P1RCzojSDCsj1CIZHJoa wcKICvncGmvAAn7pnw3JTidatvWiTB+X412URRM59w11wLIm6LQl2xxpt3mYkRhfhek4 5BSa9Lv+rIfCdZav5R5Lz7yXk9iU5eOhsOqE6URdj4bTyH83Orh9dNJ06vKdi3gzHn+5 WsJbXgGmAprzwvVZsH63ECLH9Pvk2vbDrFEnk44MmyEdY1v0l77y9WAc9ommsHe6brh/ C7YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GjtcVwkV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w142si6747129oia.132.2020.03.02.12.06.47; Mon, 02 Mar 2020 12:06:59 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GjtcVwkV; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726974AbgCBUE6 (ORCPT + 99 others); Mon, 2 Mar 2020 15:04:58 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:39396 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725781AbgCBUE5 (ORCPT ); Mon, 2 Mar 2020 15:04:57 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 022K4ZKV047997; Mon, 2 Mar 2020 14:04:35 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1583179475; bh=WgwGOwOgqI6sh/GvST+Ydk6b4mvZqddNhr33TlV/TRE=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=GjtcVwkVT2H3TtRiPh8TsACjE0rwYaH1warrJoz1VC/KrC+a5tars3DzZizjOByuU a+Ly5dpD71/kUFp4Hnpmh51Ye20DysFxlp6B1IS0WMAuzj97R0c7QFy4BClRS+uq+A xQbyhXXT6sktK9krSSCJZjgMK6KNvaZA1aE4SOj4= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 022K4ZNR012964 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 2 Mar 2020 14:04:35 -0600 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Mon, 2 Mar 2020 14:04:35 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE111.ent.ti.com (10.64.6.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Mon, 2 Mar 2020 14:04:35 -0600 Received: from sokoban.bb.dnainternet.fi (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 022K4UtC074555; Mon, 2 Mar 2020 14:04:33 -0600 From: Tero Kristo To: , , CC: Subject: [PATCHv2 2/4] watchdog: reset last_hw_keepalive time at start Date: Mon, 2 Mar 2020 22:04:24 +0200 Message-ID: <20200302200426.6492-3-t-kristo@ti.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200302200426.6492-1-t-kristo@ti.com> References: <20200302200426.6492-1-t-kristo@ti.com> MIME-Version: 1.0 Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently the watchdog core does not initialize the last_hw_keepalive time during watchdog startup. This will cause the watchdog to be pinged immediately if enough time has passed from the system boot-up time, and some types of watchdogs like K3 RTI does not like this. To avoid the issue, setup the last_hw_keepalive time during watchdog startup. Signed-off-by: Tero Kristo --- v2: * apply functionality always instead of being behind a flag drivers/watchdog/watchdog_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/watchdog_dev.c b/drivers/watchdog/watchdog_dev.c index 8b5c742f24e8..7e4cd34a8c20 100644 --- a/drivers/watchdog/watchdog_dev.c +++ b/drivers/watchdog/watchdog_dev.c @@ -282,6 +282,7 @@ static int watchdog_start(struct watchdog_device *wdd) if (err == 0) { set_bit(WDOG_ACTIVE, &wdd->status); wd_data->last_keepalive = started_at; + wd_data->last_hw_keepalive = started_at; watchdog_update_worker(wdd); } -- 2.17.1 -- Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki