Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3092315yba; Mon, 8 Apr 2019 10:56:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqza6eY5tn0rdyPYzGfJStp0sWuhJV3b/YzpPUtO4ck6jJlywgIPEcGvT5cCYvRqBssp+lA5 X-Received: by 2002:aa7:8392:: with SMTP id u18mr5166216pfm.217.1554746201238; Mon, 08 Apr 2019 10:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554746201; cv=none; d=google.com; s=arc-20160816; b=FgRRN2QT7IIfdvHBlUdv4EcJO4J/IxCmO4+d9bDJi5xJooEVee8zpPGWI3k+lNpzC4 zwVi3qS/3h1vfM02J5cwjQ15QMcrTrj8yCe86HsYmwLudx8MWpbClY3PzOx4NiorXM5i uyVLtTmAHdTAuWRdgBCsFswM5hixhiqw1neqXd1JjF1a60KK0IilSdmXOHhqnYVCb5te uNPnAMU4GRNgPSyLQtlmV+ZmHf1FAFgoZl7Z1SgGwDSuSi7DDMgiv2lu8rYC6kU0m/g0 YbTOtEIf9kzpNhHXsc8MumyV9JGgvY09GZqlUNPc+d3v7JIWrnreFwTvJM+HGf20yxoB 02fA== 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=f8qq35znjSiFF6B/JksqxrVBndIzPgfME9o2tacpoTE=; b=w7eoWXmuuYh4xUbuPytD3DuJK5/S7b6vpLu0lyzXNn/oJZWWHfUpwUI98oVSLRFbUZ TQJjM/DWTsmjpTpu3aewHwm3Ijs82QbSGOR863UwdMdnYMSFkst6e0KO2yco8nktJQZd tlkn2Gytx2NXxUMfcLlHt2O2eT0ttlkiVWzH/3IT/lNSuMEgekemH1jhgg6ugu/Re2Ng dzvclR9WmTYNZSq0VITbFnTqgtZ/dPYZJ+40v+tF3lx134iF8Dp04R8cEW1oOWtXFsxX eC6GgYxEKqk0/Bwj/2F/VamQa8nZohfwSrjmVULguxkb1vhlZc1H6HHrSfmP4iXjaP70 pOxg== 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 f1si27933602pld.32.2019.04.08.10.56.25; Mon, 08 Apr 2019 10:56:41 -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 S1727523AbfDHP72 (ORCPT + 99 others); Mon, 8 Apr 2019 11:59:28 -0400 Received: from foss.arm.com ([217.140.101.70]:50928 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726373AbfDHP72 (ORCPT ); Mon, 8 Apr 2019 11:59:28 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id CA7FD15AB; Mon, 8 Apr 2019 08:59:27 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.72.51.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 092073F557; Mon, 8 Apr 2019 08:59:25 -0700 (PDT) Date: Mon, 8 Apr 2019 16:59:23 +0100 From: Mark Rutland To: Marc Zyngier Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Russell King , Will Deacon , Catalin Marinas , Daniel Lezcano , Wim Van Sebroeck , Guenter Roeck , Valentin Schneider Subject: Re: [PATCH 2/7] watchdog/sbsa: Use arch_timer_read_counter instead of arch_counter_get_cntvct Message-ID: <20190408155923.GN6139@lakrids.cambridge.arm.com> References: <20190408154907.223536-1-marc.zyngier@arm.com> <20190408154907.223536-3-marc.zyngier@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190408154907.223536-3-marc.zyngier@arm.com> User-Agent: Mutt/1.11.1+11 (2f07cb52) (2018-12-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 08, 2019 at 04:49:02PM +0100, Marc Zyngier wrote: > Only arch_timer_read_counter will guarantee that workarounds are > applied. So let's use this one instead of arch_counter_get_cntvct. > > Signed-off-by: Marc Zyngier Acked-by: Mark Rutland Mark. > --- > drivers/watchdog/sbsa_gwdt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c > index e8bd9887c566..e221e47396ab 100644 > --- a/drivers/watchdog/sbsa_gwdt.c > +++ b/drivers/watchdog/sbsa_gwdt.c > @@ -161,7 +161,7 @@ static unsigned int sbsa_gwdt_get_timeleft(struct watchdog_device *wdd) > timeleft += readl(gwdt->control_base + SBSA_GWDT_WOR); > > timeleft += lo_hi_readq(gwdt->control_base + SBSA_GWDT_WCV) - > - arch_counter_get_cntvct(); > + arch_timer_read_counter(); > > do_div(timeleft, gwdt->clk); > > -- > 2.20.1 >