Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp359394lqe; Sat, 6 Apr 2024 04:31:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUv/FXKIELlp8GdbtTSL4lY86NpDT43f9HfDjUzWi1GY7x1LLoN3OIBMUQn3u6AMlyy/T7nhTETw5pokoy5IJ+aV+H4XTL1AxsviRJOog== X-Google-Smtp-Source: AGHT+IEVbAWx21102WdkOsdeUR8OGvKnAPQYQtIE9ElHkxP1+vS9WOHQkWwOcp2BcRlX59kr8eyY X-Received: by 2002:a05:6214:b67:b0:691:4d1f:6a65 with SMTP id ey7-20020a0562140b6700b006914d1f6a65mr7960986qvb.27.1712403115518; Sat, 06 Apr 2024 04:31:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712403115; cv=pass; d=google.com; s=arc-20160816; b=w/THHQptW1I6pZGMNM118x+MlWeIRNtNGbHR38HcwgcFNA7QwXjhigYAsvaGRRlgYy /op+DW1YtHX7mQdPUAWlEvMcSsFaLsryEBBGekT8isbdnnMLqUcpQcaA4swptdWmSc8Z Sjm0d//Erh5oUIGxdAPQgXWgnmC9nbceK4gFa4fbKwOeEhzP/9phNBPiG3eSjoPWWHVY +1DuKfOc84rcBQPX/ty25GhF9dsuKrxmYU9WMwQRG1vN7DHapgArORrE/u35KMTn2/Kr wbtsDKa7kvRU5Xld95FtuKiE9vJRrI/s7buqmpjvosqfmS003rj69T0ek0AaYlfQAeoh UApQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Nx8tUhFmxzb3feagjFbK+JeFzJ9IjfckS5vEarxhKdA=; fh=yEGAcB6c11bv/hMacXJtvSvMQQrGJJnmwD3VXod7fNQ=; b=xdr+g9Cpmr6kFTAWGhggbOL5fxHlkZP1prJx2tDRG1r/yCRwM/i/EuXk19djXEEaDU niKUxKMQb5G4Hk0A/bJ0qhLpgbrKlNvzFBIn0oCprMze+5uPGGQ/8zpi1zWZ9gepR8b+ DIVhsOQgyHlnZ0ybDKTU6XYtfR6bDizfjBnnKu49dwlg//M2F1EgLQDnnogOtw162Bhu LKA0zDdL04T8HnI0jav5NmUM/HhOZq3NadOhk3P90uGxH/rbxlTLDlqEPqUp3AFMNJZM NC5WaNF2FzxVndgQfbCkIZdixXVWvACXz6rFBwtq7a0rZwVTUF9iA34mLd2P9DgjCwAl JEJw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="A8XjQBe/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133910-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133910-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s7-20020ad44b27000000b0069936e99a2esi3871657qvw.513.2024.04.06.04.31.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Apr 2024 04:31:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-133910-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="A8XjQBe/"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-133910-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-133910-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 400701C20E97 for ; Sat, 6 Apr 2024 11:31:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88722376E9; Sat, 6 Apr 2024 11:31:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="A8XjQBe/" 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 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: 8bit 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) = { .rating = 100, .set_next_event = clint_clock_next_event, .set_state_shutdown = clint_clock_shutdown, + .set_state_oneshot_stopped = clint_clock_shutdown, }; static int clint_timer_starting_cpu(unsigned int cpu) -- 2.43.0