Received: by 2002:ab2:6991:0:b0:1f2:fff1:ace7 with SMTP id v17csp162338lqo; Wed, 27 Mar 2024 09:29:56 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXlb7Dteg+iYQTytPVKrujLWbPEGa81U9WySaPIMIHn/CmrfOE23NBGAej8GxR1/pKLq1wITLzYBEEC5KMFbkmpEZEbzgZBysLahhnC/A== X-Google-Smtp-Source: AGHT+IH2C0UijO5eiLr/6pDDqpQSv5jBGMk1xiDWRK3heIuFhugWN3ZG0r2jk+dN6SG4f3b5Hibw X-Received: by 2002:a17:90a:7404:b0:2a0:4ea4:4bb2 with SMTP id a4-20020a17090a740400b002a04ea44bb2mr116494pjg.45.1711556996390; Wed, 27 Mar 2024 09:29:56 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711556996; cv=pass; d=google.com; s=arc-20160816; b=Tumc8ZV5+Q16ZOCh0jg2xDwhr85lBNIV4I2whZQc33D/d23OzImEyu4bSjvRS0+BP5 SzmoMFahV8w8ChfUqnhglggmuOed43R/Amsk6C8TDD5bAvK/JiqG2VMU9wb/Bwkm1yA7 aD5JNe/ZqdQhNeqFQJhpP2ogvDFSS54qwcYijd8T1TEntLvbhNTsZlG9aGopFo1+yP4A vIaaomOfqVdTDGEjlnLw5Y/fQexRcA0qqBa0LYu0vxSC5upGk8A3S1a0hWUvRu/wJgIL euzDmfd+noXpL/FlM71SbFpjYVGPgUH6vrmf9ZDhNBebRGlP9DkcHdqQ3wnnqNbaDNoK cjnQ== 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=OUk/vbIPcI4nKIESIQ7r2TCH7Cfq6j0Yk8KlQFzWd7A=; fh=m+lkMSgpAsPrsBPjNkIveMqClHfEKCUqtpjmyG590AA=; b=uBz5H6mGBy+SfQmIyqLC0SERgqpToLMErK+3SDJcGBgXNfa0KZF7WI2Bey/oec5Sl+ 2rGxBxmRD5dwwuE7AZC4oiDUsrLy9XFa+D80c/1lRH/N9in74vN49Xx/Qkws6dnZFQFs UyXoy6WDCtb/oipM7lHUcirM9hR/kQz+g3QPyD06oEIpVBK+LReLbms8QmXRqZ9J+wmV F+XavBXneUcRx1duTUmCEI519ps/7ezeNQOmmKJRbD5rGaEA/4z91koiBByn1ftySXsZ oEr/k9hgf59m/HkBiMfMPmx6FcMuujZXVPNPFq7GUMzt26XHG5nitjzs0UuDnD5bp2/j gf2Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rJaykR9+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-121570-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121570-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id f6-20020a17090a9b0600b0029be5633e4asi1767990pjp.113.2024.03.27.09.29.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Mar 2024 09:29:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-121570-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rJaykR9+; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-121570-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-121570-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 7D167B3E7D1 for ; Wed, 27 Mar 2024 15:50:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E23C9132C0C; Wed, 27 Mar 2024 15:48:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rJaykR9+" 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 0E45F1327FC for ; Wed, 27 Mar 2024 15:48:26 +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=1711554506; cv=none; b=mr4/aYVb2Jj51wkLmFfHkLDYEwSuBRbVQL+EpqCSPYqYJ58UgFpuLuPHNbpKfHZ2dGQ964tE5xx0JNbm0ojvQPqmyx8tLXj+b+ifXPSQ88aErSvXKBJNYFINHU+REKdKVCprCRQCZR5sLspv+XNHJW6E7sULbQGWZviuM/bR6w4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711554506; c=relaxed/simple; bh=G8Du/nKE3EQGqBI4paXDN1AIdNVl4glAliWu+H6P45c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s8GrVma+9ZlVg7+CztTI4+kpsChSFvIZYAh0sXQMDSwRHO3sHKkw7VowYrrrP56+7Zh1gcrPhymfLOCwd+KEO0iYqFKFQZuPqz03DSbqzGMfW0vmy86XaF/Xx4TugFAH/rJ1VSCLG4f6kVRochJ54MjUqQhPS7rscrYs4SWD7M0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rJaykR9+; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 16D24C433F1; Wed, 27 Mar 2024 15:48:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711554505; bh=G8Du/nKE3EQGqBI4paXDN1AIdNVl4glAliWu+H6P45c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rJaykR9+OUNmZr8FxTeTlU3uWMWDqdwYbp3icdv9jf2Q6hJMBgQDEBGpikt5hRtAf 6La3dI3Nq+RMa6s+5yvwewnzw/JWkIbLhukmqq88cKYBgWA56MFnJxYJhIzMCCsrT2 tdnL14om1dRM4/C9RQxh1xS4SJzqci0pX/fYmssovPrdEpAZMqbn7/lp2XLV1/dygo EysNPjAnNgZK+erhl7WXhr0hfGBWQCY+0wU14BCX9wAa3Y4YXsYbJ/pLBU+c6/WDy1 /xyzq1sIy9qXQAFVpd4QGDCQC3F/7gyOAzQzskObCZ25XfFaGsPFxoSm6YPYymed7k Blh/EcdKYg7og== From: Jisheng Zhang To: Paul Walmsley , Palmer Dabbelt , Albert Ou , Daniel Lezcano , Thomas Gleixner Cc: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] clocksource/drivers/timer-clint: Add set_state_oneshot_stopped Date: Wed, 27 Mar 2024 23:35:02 +0800 Message-ID: <20240327153502.2133-4-jszhang@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240327153502.2133-1-jszhang@kernel.org> References: <20240327153502.2133-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 56cf6c672e6d..f5c04520d6b1 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