From nobody Sat Feb 7 18:46:44 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B44DF374D3 for ; Sat, 6 Apr 2024 11:31:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712403084; cv=none; b=FTuv0SqoxV3O42XNAXF3Ep+Ht7LoibgbbKJ/tpqUf5UBb9D23fSgCjppQELbrXGux3XjtP6oE6DjVscxmIFKJ/Z8dsSIlwTpqHe/JTyPp804a7c+nBp9Fg6jRU1wavtnshFmNt3YiwCZuPymg9bcicp23Aq6Vgpyri/1ZOJumDc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712403084; c=relaxed/simple; bh=QNz4CJCFePste/7DhKkLbFCEPMnrk6GSUJBGB1Aj74U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=INQ5VOPHpG21O7q2f/meBV0KqYAVtiW61xNSY3K3YFPwhqLV1s9+KVN4lwYbNFjYiP8FKEq4tus0BLIX8DXwI7++DtSw/4uiwao97fIBW47hAQpMT7qrNELwNf7aEC4ZN9D0Y7ey6g7VpWvKCIapcxRgo5vql2Ao3vsBpb99Kdc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=A8XjQBe/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="A8XjQBe/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id E4331C433F1; Sat, 6 Apr 2024 11:31:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712403084; bh=QNz4CJCFePste/7DhKkLbFCEPMnrk6GSUJBGB1Aj74U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A8XjQBe/E5HTHforMou7F0rT2W0G3OjrHdYJ6K+oat6W4FF6vVUP9NIUAIqT9EJUR uqenOb2f/JATM2VxEjKOCIq8oMSyy1DPKELKFX5K1256zGXVDsS7f6K/qDevPWKkSl 7WivOFgVG7kANEROaGzXdC7LTSYVQ6TqzqyHHwsSr1Kirr/Vs5s0ObmhnhS+EKwuVR bd2GGlIvffrXvgNc33owMD0XRJ6F6Y1lohtulMHUIG0PRuAq5pbKNCeDJHiDO+XY4+ xPgDLTi21AlyVDJbdJw3XmX4cYBBD/Qndb5zMUqu+n3H1GYqblgHIG97b0S4QaQdGP N3cZKEBv//cLA== From: Jisheng Zhang To: Daniel Lezcano , Thomas Gleixner , Paul Walmsley , Palmer Dabbelt , Albert Ou , Samuel Holland Cc: linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v2 3/3] clocksource/drivers/timer-clint: Add set_state_oneshot_stopped Date: Sat, 6 Apr 2024 19:17:57 +0800 Message-ID: <20240406111757.1597-4-jszhang@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240406111757.1597-1-jszhang@kernel.org> References: <20240406111757.1597-1-jszhang@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" To avoid spurious timer interrupts when KTIME_MAX is used, we need to configure set_state_oneshot_stopped(). Although implementing this is optional, it still affects things like power management for the extra timer interrupt. Check commit 8fff52fd5093 ("clockevents: Introduce CLOCK_EVT_STATE_ONESHOT_STOPPED state") for more information. Signed-off-by: Jisheng Zhang --- drivers/clocksource/timer-clint.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clocksource/timer-clint.c b/drivers/clocksource/timer-= clint.c index 1c17eff9861e..f468fa8bf5f0 100644 --- a/drivers/clocksource/timer-clint.c +++ b/drivers/clocksource/timer-clint.c @@ -134,6 +134,7 @@ static DEFINE_PER_CPU(struct clock_event_device, clint_= clock_event) =3D { .rating =3D 100, .set_next_event =3D clint_clock_next_event, .set_state_shutdown =3D clint_clock_shutdown, + .set_state_oneshot_stopped =3D clint_clock_shutdown, }; =20 static int clint_timer_starting_cpu(unsigned int cpu) --=20 2.43.0