| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * linux/arch/ia64/kernel/time.c |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 24 | 25 | #include <linux/platform_device.h> |
|---|
| 25 | 26 | #include <linux/sched/cputime.h> |
|---|
| 26 | 27 | |
|---|
| 27 | | -#include <asm/machvec.h> |
|---|
| 28 | 28 | #include <asm/delay.h> |
|---|
| 29 | 29 | #include <asm/hw_irq.h> |
|---|
| 30 | 30 | #include <asm/ptrace.h> |
|---|
| .. | .. |
|---|
| 32 | 32 | #include <asm/sections.h> |
|---|
| 33 | 33 | |
|---|
| 34 | 34 | #include "fsyscall_gtod_data.h" |
|---|
| 35 | +#include "irq.h" |
|---|
| 35 | 36 | |
|---|
| 36 | 37 | static u64 itc_get_cycles(struct clocksource *cs); |
|---|
| 37 | 38 | |
|---|
| .. | .. |
|---|
| 132 | 133 | return delta_stime; |
|---|
| 133 | 134 | } |
|---|
| 134 | 135 | |
|---|
| 135 | | -void vtime_account_system(struct task_struct *tsk) |
|---|
| 136 | +void vtime_account_kernel(struct task_struct *tsk) |
|---|
| 136 | 137 | { |
|---|
| 137 | 138 | struct thread_info *ti = task_thread_info(tsk); |
|---|
| 138 | 139 | __u64 stime = vtime_delta(tsk); |
|---|
| .. | .. |
|---|
| 146 | 147 | else |
|---|
| 147 | 148 | ti->stime += stime; |
|---|
| 148 | 149 | } |
|---|
| 149 | | -EXPORT_SYMBOL_GPL(vtime_account_system); |
|---|
| 150 | +EXPORT_SYMBOL_GPL(vtime_account_kernel); |
|---|
| 150 | 151 | |
|---|
| 151 | 152 | void vtime_account_idle(struct task_struct *tsk) |
|---|
| 152 | 153 | { |
|---|
| .. | .. |
|---|
| 165 | 166 | if (cpu_is_offline(smp_processor_id())) { |
|---|
| 166 | 167 | return IRQ_HANDLED; |
|---|
| 167 | 168 | } |
|---|
| 168 | | - |
|---|
| 169 | | - platform_timer_interrupt(irq, dev_id); |
|---|
| 170 | 169 | |
|---|
| 171 | 170 | new_itm = local_cpu_data->itm_next; |
|---|
| 172 | 171 | |
|---|
| .. | .. |
|---|
| 382 | 381 | return now; |
|---|
| 383 | 382 | } |
|---|
| 384 | 383 | |
|---|
| 385 | | - |
|---|
| 386 | | -static struct irqaction timer_irqaction = { |
|---|
| 387 | | - .handler = timer_interrupt, |
|---|
| 388 | | - .flags = IRQF_IRQPOLL, |
|---|
| 389 | | - .name = "timer" |
|---|
| 390 | | -}; |
|---|
| 391 | | - |
|---|
| 392 | 384 | void read_persistent_clock64(struct timespec64 *ts) |
|---|
| 393 | 385 | { |
|---|
| 394 | 386 | efi_gettimeofday(ts); |
|---|
| .. | .. |
|---|
| 397 | 389 | void __init |
|---|
| 398 | 390 | time_init (void) |
|---|
| 399 | 391 | { |
|---|
| 400 | | - register_percpu_irq(IA64_TIMER_VECTOR, &timer_irqaction); |
|---|
| 392 | + register_percpu_irq(IA64_TIMER_VECTOR, timer_interrupt, IRQF_IRQPOLL, |
|---|
| 393 | + "timer"); |
|---|
| 401 | 394 | ia64_init_itm(); |
|---|
| 402 | 395 | } |
|---|
| 403 | 396 | |
|---|