[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <170560583897.398.3924693885126380500.tip-bot2@tip-bot2>
Date: Thu, 18 Jan 2024 19:23:58 -0000
From: "tip-bot2 for Joshua Yeong" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Joshua Yeong <joshua.yeong@...rfivetech.com>,
Anup Patel <anup@...infault.org>, Daniel Lezcano <daniel.lezcano@...aro.org>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject:
[tip: timers/core] clocksource/timer-riscv: Add riscv_clock_shutdown callback
The following commit has been merged into the timers/core branch of tip:
Commit-ID: 6a902b118e7f30dbf0e6248f7b0f97e12c0939c3
Gitweb: https://git.kernel.org/tip/6a902b118e7f30dbf0e6248f7b0f97e12c0939c3
Author: Joshua Yeong <joshua.yeong@...rfivetech.com>
AuthorDate: Thu, 16 Nov 2023 18:53:12 +08:00
Committer: Daniel Lezcano <daniel.lezcano@...aro.org>
CommitterDate: Wed, 27 Dec 2023 15:37:11 +01:00
clocksource/timer-riscv: Add riscv_clock_shutdown callback
Add clocksource detach/shutdown callback to disable RISC-V timer interrupt when
switching out riscv timer as clock source
Signed-off-by: Joshua Yeong <joshua.yeong@...rfivetech.com>
Reviewed-by: Anup Patel <anup@...infault.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@...aro.org>
Link: https://lore.kernel.org/r/20231116105312.4800-1-joshua.yeong@starfivetech.com
---
drivers/clocksource/timer-riscv.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c
index 57857c0..e66dcbd 100644
--- a/drivers/clocksource/timer-riscv.c
+++ b/drivers/clocksource/timer-riscv.c
@@ -61,12 +61,19 @@ static int riscv_clock_next_event(unsigned long delta,
return 0;
}
+static int riscv_clock_shutdown(struct clock_event_device *evt)
+{
+ riscv_clock_event_stop();
+ return 0;
+}
+
static unsigned int riscv_clock_event_irq;
static DEFINE_PER_CPU(struct clock_event_device, riscv_clock_event) = {
.name = "riscv_timer_clockevent",
.features = CLOCK_EVT_FEAT_ONESHOT,
.rating = 100,
.set_next_event = riscv_clock_next_event,
+ .set_state_shutdown = riscv_clock_shutdown,
};
/*
Powered by blists - more mailing lists