[PATCH dovetail v12 08/11] clocksource/timer-riscv: irq_pipeline: enable pipelined clock events
Tobias Schaffner <[email protected]> Tue, 28 Jul 2026 13:12:19 +0200
| Newsgroups | dev.linux.lists.xenomai |
|---|---|
| Message-ID | <[email protected]> |
Signed-off-by: Tobias Schaffner <[email protected]> --- drivers/clocksource/timer-riscv.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/clocksource/timer-riscv.c b/drivers/clocksource/timer-riscv.c index cfc4d83c42c0..fceebef28978 100644 --- a/drivers/clocksource/timer-riscv.c +++ b/drivers/clocksource/timer-riscv.c @@ -71,7 +71,8 @@ static int riscv_clock_shutdown(struct clock_event_device *evt) 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, + .features = CLOCK_EVT_FEAT_ONESHOT | + CLOCK_EVT_FEAT_PIPELINE, .rating = 100, .set_next_event = riscv_clock_next_event, .set_state_shutdown = riscv_clock_shutdown, @@ -150,7 +151,7 @@ static irqreturn_t riscv_timer_interrupt(int irq, void *dev_id) struct clock_event_device *evdev = this_cpu_ptr(&riscv_clock_event); riscv_clock_event_stop(); - evdev->event_handler(evdev); + clockevents_handle_event(evdev); return IRQ_HANDLED; } @@ -182,9 +183,9 @@ static int __init riscv_timer_init_common(void) sched_clock_register(riscv_sched_clock, 64, riscv_timebase); - error = request_percpu_irq(riscv_clock_event_irq, - riscv_timer_interrupt, - "riscv-timer", &riscv_clock_event); + error = request_percpu_irq_affinity_flags(riscv_clock_event_irq, + riscv_timer_interrupt, IRQF_TIMER, + "riscv-timer", NULL, &riscv_clock_event); if (error) { pr_err("registering percpu irq failed [%d]\n", error); return error; -- 2.43.0