Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3440312pxk; Mon, 28 Sep 2020 18:32:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzSBtSAAkYS4oZFzMx5basy4D+AgiBnQdPYlZ1U8a/v9ziaWFwQsG4CAgi/Cj1NYgEiH/rV X-Received: by 2002:a17:906:4101:: with SMTP id j1mr1444719ejk.473.1601343141934; Mon, 28 Sep 2020 18:32:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601343141; cv=none; d=google.com; s=arc-20160816; b=f85Jtt9yINxiw5Q5ZuZ9zk9H24T89B7bwUzWQ9vO97wBV6JtPmw2S46p5ZjTAK+S49 AEO48shouxnSCePcaeDTXmgms1XeGJrO3fsyE2hoK6pFq23kHuDeTU1CK2ZKn+Izi6tl zDF5n5AneuhI4bVJJCkmOk2IEgo450Oj9OnIck32zWNcR2SnVxpNqannfNzNbwdU0OeF Wk3XzYPIhtF1e1zwv1t6KysLXA/f0b5156Is6j61OHXTrlfrwz6UBIf7OqB3WFu3pXoS i4mOSI03rixarVgs70CqugIR3qIgVKWatICYcdb8sZjvOEf/AeqeHFyjNEPGj9uFOReC f3FQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=HHuJI7sxHhPZ0QF1rR+cpS6AZt/HJqXOfVEhpAU9AKk=; b=kN4z4vyMGEs2hKq7DZFsv6NbLT1T37k05RCuipCcF2ahzIT0xiXnsWZepiXwu+spm9 sVwffDDuWuaIuz79VVO0kVhPH/LfPPDs0kAkOgIDiUlQNSAy+fidL8eseCQ5AadWyczL owejqwlgxii+Qa7vJNcIG/Ip06tpTjOq+rLEJnF8X9IPBsYsuXLTWvoaKEtxYGUrDezy z4wjyi9SO7Larku0w+xNURWoZtZDfHXB9WKgbTRJBOMN3mpFc9/YuFLzmP4w3ht9KM2M t6SjIJlHA5j/JQOr/kpuCec3a+yt06aFC4NEOXxwRFGemB47Jo9RZhQm9cQyR1BRjK/G ri8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=a7sj9sdi; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i1si13385ejs.493.2020.09.28.18.31.53; Mon, 28 Sep 2020 18:32:21 -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=@kernel.org header.s=default header.b=a7sj9sdi; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727233AbgI2Ba3 (ORCPT + 99 others); Mon, 28 Sep 2020 21:30:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:39272 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726379AbgI2Ba3 (ORCPT ); Mon, 28 Sep 2020 21:30:29 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 6280A2083B; Tue, 29 Sep 2020 01:30:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601343029; bh=lX9O4hxvxd90v1IeDiyJoQVpOMMiA7ft8aBH2MqUH60=; h=From:To:Cc:Subject:Date:From; b=a7sj9sdi5WSXc7BXNnKs3zrdZZWUN7ZDB7O+wsrc6ij6zA7NbLruJ49HlyWGMTaV2 tIk/sNCid6tedj0tnl8CXlu0ouPBzEEBQjZmF/FxiMtqmnJuNLZtBJIFtlEj5rn5yI dNMSgPz+Wa32hjzL7vGVh0ZUDidga5lJghHhhMFo= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Guo Ren , Xu Kai , Daniel Lezcano , Thomas Gleixner , Sasha Levin , linux-csky@vger.kernel.org Subject: [PATCH AUTOSEL 5.8 01/29] clocksource/drivers/timer-gx6605s: Fixup counter reload Date: Mon, 28 Sep 2020 21:29:58 -0400 Message-Id: <20200929013027.2406344-1-sashal@kernel.org> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Guo Ren [ Upstream commit bc6717d55d07110d8f3c6d31ec2af50c11b07091 ] When the timer counts to the upper limit, an overflow interrupt is generated, and the count is reset with the value in the TIME_INI register. But the software expects to start counting from 0 when the count overflows, so it forces TIME_INI to 0 to solve the potential interrupt storm problem. Signed-off-by: Guo Ren Tested-by: Xu Kai Cc: Daniel Lezcano Cc: Thomas Gleixner Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/1597735877-71115-1-git-send-email-guoren@kernel.org Signed-off-by: Sasha Levin --- drivers/clocksource/timer-gx6605s.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clocksource/timer-gx6605s.c b/drivers/clocksource/timer-gx6605s.c index 80d0939d040b5..8d386adbe8009 100644 --- a/drivers/clocksource/timer-gx6605s.c +++ b/drivers/clocksource/timer-gx6605s.c @@ -28,6 +28,7 @@ static irqreturn_t gx6605s_timer_interrupt(int irq, void *dev) void __iomem *base = timer_of_base(to_timer_of(ce)); writel_relaxed(GX6605S_STATUS_CLR, base + TIMER_STATUS); + writel_relaxed(0, base + TIMER_INI); ce->event_handler(ce); -- 2.25.1