From: "tip-bot2 for Joshua Yeong" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Joshua Yeong <joshua.yeong@starfivetech.com>,
Anup Patel <anup@brainfault.org>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: timers/core] clocksource/timer-riscv: Add riscv_clock_shutdown callback
Date: Thu, 18 Jan 2024 19:23:58 -0000 [thread overview]
Message-ID: <170560583897.398.3924693885126380500.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20231116105312.4800-1-joshua.yeong@starfivetech.com>
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@starfivetech.com>
AuthorDate: Thu, 16 Nov 2023 18:53:12 +08:00
Committer: Daniel Lezcano <daniel.lezcano@linaro.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@starfivetech.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.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,
};
/*
prev parent reply other threads:[~2024-01-18 19:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-16 10:53 [PATCH v3 1/1] " Joshua Yeong
2023-11-16 11:51 ` Anup Patel
2023-12-04 17:40 ` Daniel Lezcano
2024-01-18 19:23 ` tip-bot2 for Joshua Yeong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=170560583897.398.3924693885126380500.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=anup@brainfault.org \
--cc=daniel.lezcano@linaro.org \
--cc=joshua.yeong@starfivetech.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®