Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3008910yba; Mon, 8 Apr 2019 09:10:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqwT6hRpH4lejqJldogi8dde8h9dn+lYsHYtBhqRv0suSrnjsYM+s+96zpGRnoifDSf3aLcj X-Received: by 2002:a62:2a97:: with SMTP id q145mr30818931pfq.22.1554739835476; Mon, 08 Apr 2019 09:10:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554739835; cv=none; d=google.com; s=arc-20160816; b=mS5WNaf7H/WOb2Qjlph5kB+sPRmYPMuMYo6OTXUu2u5D/pXJ916Fbn7iSP1DGSCH+U sj6aSml/Hib3Za1WVcdr7b3aef4+n0ros/EB2C2lCwVmqlt6+mwijYmpNnHzm0aSTRwr 5tKsMavuyfY9KDKsVgVxWwN9JQw0gMVLOeyC7FffbQ4bXRfFlFqIrG8BzMdwv4szu7xt n4noPUdkJ7oX+SZosRX/br8T5+BntsmULvGGHJE9ImhgdrnaQoha+Wuvi0mYFubtxaSJ ArNRV+gZuQfyPiKsJSDOangY2NlGlM9E/qvIgzRAFAtNI6R0wqh3tf8mnX9cxkFXMKUQ sBdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Vg/DlTYZmLXuxBkTbJDTxcuTOwpWf0mxCzP0bP5IFhk=; b=IGqtkat+20o/ets7hzdRx9XWMlhP0tfLIQ38W3DBo8NHHTOE8VJMd86kjXOVp9q+sN rLgueUhDVPwBwcRLpelGuZF7rnT+f9Syg+P1jVQmw2ZFF0w6frcv1nKF1DJFgj2zmCZB UJ0RUf4wP1YmM/vzobJqgz6CqHnMYlcDFt1xSykEi4+j8jUbfhWZur3v4ASd24qPtdRO jK6sTW4TGN2n0QL3uKKnqpsKD1NVZ2Hr+07ghmwtZRdubwMh4GKZfGmgocqOmUjzDTzt Axf9tyPIp3yU/EWhhCwwFcTKP99Vr3/GXB1wiX9MxU08rDAItTndOwnRUceSg+QVFaQE GzEw== 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 g2si26425475pgc.225.2019.04.08.09.10.20; Mon, 08 Apr 2019 09:10:35 -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 S1728891AbfDHPtm (ORCPT + 99 others); Mon, 8 Apr 2019 11:49:42 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:50600 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728842AbfDHPtl (ORCPT ); Mon, 8 Apr 2019 11:49:41 -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 DB2131688; Mon, 8 Apr 2019 08:49:40 -0700 (PDT) Received: from filthy-habits.cambridge.arm.com (filthy-habits.cambridge.arm.com [10.1.196.92]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1A81D3F557; Mon, 8 Apr 2019 08:49:38 -0700 (PDT) From: Marc Zyngier To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Russell King , Will Deacon , Catalin Marinas , Mark Rutland , Daniel Lezcano , Wim Van Sebroeck , Guenter Roeck , Valentin Schneider Subject: [PATCH 2/7] watchdog/sbsa: Use arch_timer_read_counter instead of arch_counter_get_cntvct Date: Mon, 8 Apr 2019 16:49:02 +0100 Message-Id: <20190408154907.223536-3-marc.zyngier@arm.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190408154907.223536-1-marc.zyngier@arm.com> References: <20190408154907.223536-1-marc.zyngier@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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