]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blob - arch/arm/include/asm/localtimer.h
ARM: gic: consolidate PPI handling
[mirror_ubuntu-focal-kernel.git] / arch / arm / include / asm / localtimer.h
1 /*
2 * arch/arm/include/asm/localtimer.h
3 *
4 * Copyright (C) 2004-2005 ARM Ltd.
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 */
10 #ifndef __ASM_ARM_LOCALTIMER_H
11 #define __ASM_ARM_LOCALTIMER_H
12
13 #include <linux/interrupt.h>
14
15 struct clock_event_device;
16
17 /*
18 * Setup a per-cpu timer, whether it be a local timer or dummy broadcast
19 */
20 void percpu_timer_setup(void);
21
22 /*
23 * Per-cpu timer IRQ handler
24 */
25 irqreturn_t percpu_timer_handler(int irq, void *dev_id);
26
27 #ifdef CONFIG_LOCAL_TIMERS
28
29 #ifdef CONFIG_HAVE_ARM_TWD
30
31 #include "smp_twd.h"
32
33 #define local_timer_ack() twd_timer_ack()
34
35 #else
36
37 /*
38 * Platform provides this to acknowledge a local timer IRQ.
39 * Returns true if the local timer IRQ is to be processed.
40 */
41 int local_timer_ack(void);
42
43 #endif
44
45 /*
46 * Setup a local timer interrupt for a CPU.
47 */
48 int local_timer_setup(struct clock_event_device *);
49
50 #else
51
52 static inline int local_timer_setup(struct clock_event_device *evt)
53 {
54 return -ENXIO;
55 }
56 #endif
57
58 #endif