Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1371722ybi; Fri, 14 Jun 2019 13:34:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqzr14znirQc5Qqb1JV1dIuYzI9UGSJrLKvdkRkegSjU49sLMDjnmwcHvtu5P+gUezKDN9+E X-Received: by 2002:a17:902:7618:: with SMTP id k24mr32238148pll.208.1560544492908; Fri, 14 Jun 2019 13:34:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560544492; cv=none; d=google.com; s=arc-20160816; b=fc5nAu7k7GnddxENoCA+YUkGbih0BPmBPlTWOx3Ep5CMxemgvh6nkpTuCtHlCzjeBd WbNU267BW8LTByDK8CVmEW5A1QuEK+HMN5A5uOU7JkmN6K2VNAoheT+jIzw/9jNU1vUe kQ7sl7bQspgRoo2xFqqJ/Pi+fmPPdaRTNh4O4YPVPosE8o9ROidSgVJ7OYl+rE+kR2TQ M86L0UBp7dmIeTGpBwB+rbS/stP+N0fbqP9LE9DOZsCSbw1QhasF9VS9oYS9beA2SfHA QuJGx8YkKexu/1rltsw8gG3G+aeLbA7O0wcPUndUspfmJqUQUBmozGPd5kMFwKrCb5eR ijOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=vinOyRLGYEVYFlLxdu6ge0twOe59US0tACv3pOdDUps=; b=PkFGAcx1jZsrtFoZYiHOFBpXI2CLdm+UUjRD4igFYTc+GeiEbxPHabov/WYdt7eYZa /H9l1cC+GjX2QqQ5r6qw/0ujypZSOeAbTdlI/i9G3WeYKSPU/TidDvxmG+Qz60107s3V bbnEcW4oIlI2Lk9CmWVql4T0hw1p+UXa4en/Ex9KpfhrSdkiCPc/EOmm+NBxnKx3lsf0 /BEO+1eT5ivcuwKcMNGtmrnDcrousXBzjUBBC+e7zCnGXiB4AF8TEYoRMrGhYcV3Bgh4 wHWb9z00LbD6Pb3kYsiYSW5O5a7eZyICAb5/E+5qt8KYYtpbb1ZB6av4mSr447rHPkWA qN5g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32si3044314plc.152.2019.06.14.13.34.38; Fri, 14 Jun 2019 13:34:52 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727706AbfFNUdm (ORCPT + 99 others); Fri, 14 Jun 2019 16:33:42 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:56883 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726501AbfFNUdh (ORCPT ); Fri, 14 Jun 2019 16:33:37 -0400 Received: from localhost (unknown [37.205.120.66]) (Authenticated sender: alexandre.belloni@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id B9D67200009; Fri, 14 Jun 2019 20:33:30 +0000 (UTC) Date: Fri, 14 Jun 2019 22:33:27 +0200 From: Alexandre Belloni To: Ken Sloat Cc: Guenter Roeck , "nicolas.ferre@microchip.com" , "ludovic.desroches@microchip.com" , "wim@linux-watchdog.org" , "linux-arm-kernel@lists.infradead.org" , "linux-watchdog@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v2 1/1] watchdog: atmel: atmel-sama5d4-wdt: Disable watchdog on system suspend Message-ID: <20190614203327.GE3369@piout.net> References: <20190614125310.29458-1-ksloat@aampglobal.com> <20190614164609.GA29814@roeck-us.net> <20190614180826.GD3369@piout.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14/06/2019 18:43:22+0000, Ken Sloat wrote: > Well I'm a little confused still because there are two separate comments > in these statements. The first within resume implies that the init should > be called because we might have lost register values for some reason > unexplained. The sama5d2 has a suspend mode where power to the core is completely cut. Only a few IPs remain powered (in the backup power domain). Unfortunately, the watchdog is not in that domain and may lose its registers. > Then within the init it says that the bootloader might have > modified the registers so we should check them and then update it or > otherwise disable it. I'm not trying to pick apart the logic or anything, > I'm just readily assuming it is good as it was already reviewed before. > The bootloaders may have started the watchdog (this makes sense if you really care about reliability) and so we need to be careful to keep the proper parameters. > So without digging into that too much, if we don't know if any of the runtime > situations above might have occurred, then isn't it best to leave my patch > as is? Yes this has the side effect of resetting the timer count, but if > the init call is needed and we don't have any way to know if any > of the situations occurred, then we have no choice right? > Until we can differentiate between suspend modes, we have no other choice. -- Alexandre Belloni, Bootlin Embedded Linux and Kernel engineering https://bootlin.com