diff options
author | Ingo Molnar <mingo@kernel.org> | 2025-03-08 00:54:06 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-03-08 00:54:06 +0100 |
commit | f23ecef20af6fbd489e0362d33cdf8d9429fa901 (patch) | |
tree | 713f06d8335b7c3388bbfbc46cb6d2a568951252 /drivers/clocksource/jcore-pit.c | |
parent | c929d08df8bee855528b9d15b853c892c54e1eee (diff) | |
parent | 85b2b9c16d053364e2004883140538e73b333cdb (diff) |
Merge branch 'locking/urgent' into locking/core, to pick up locking fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/clocksource/jcore-pit.c')
-rw-r--r-- | drivers/clocksource/jcore-pit.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/clocksource/jcore-pit.c b/drivers/clocksource/jcore-pit.c index a3fe98cd3838..82815428f8f9 100644 --- a/drivers/clocksource/jcore-pit.c +++ b/drivers/clocksource/jcore-pit.c @@ -114,6 +114,18 @@ static int jcore_pit_local_init(unsigned cpu) pit->periodic_delta = DIV_ROUND_CLOSEST(NSEC_PER_SEC, HZ * buspd); clockevents_config_and_register(&pit->ced, freq, 1, ULONG_MAX); + enable_percpu_irq(pit->ced.irq, IRQ_TYPE_NONE); + + return 0; +} + +static int jcore_pit_local_teardown(unsigned cpu) +{ + struct jcore_pit *pit = this_cpu_ptr(jcore_pit_percpu); + + pr_info("Local J-Core PIT teardown on cpu %u\n", cpu); + + disable_percpu_irq(pit->ced.irq); return 0; } @@ -168,6 +180,7 @@ static int __init jcore_pit_init(struct device_node *node) return -ENOMEM; } + irq_set_percpu_devid(pit_irq); err = request_percpu_irq(pit_irq, jcore_timer_interrupt, "jcore_pit", jcore_pit_percpu); if (err) { @@ -237,7 +250,7 @@ static int __init jcore_pit_init(struct device_node *node) cpuhp_setup_state(CPUHP_AP_JCORE_TIMER_STARTING, "clockevents/jcore:starting", - jcore_pit_local_init, NULL); + jcore_pit_local_init, jcore_pit_local_teardown); return 0; } |