|
41 | 41 | #include <linux/init.h> |
42 | 42 | #include <linux/bcd.h> |
43 | 43 | #include <linux/profile.h> |
44 | | -#include <linux/perf_event.h> |
| 44 | +#include <linux/irq_work.h> |
45 | 45 |
|
46 | 46 | #include <asm/uaccess.h> |
47 | 47 | #include <asm/io.h> |
@@ -83,25 +83,25 @@ static struct { |
83 | 83 |
|
84 | 84 | unsigned long est_cycle_freq; |
85 | 85 |
|
86 | | -#ifdef CONFIG_PERF_EVENTS |
| 86 | +#ifdef CONFIG_IRQ_WORK |
87 | 87 |
|
88 | | -DEFINE_PER_CPU(u8, perf_event_pending); |
| 88 | +DEFINE_PER_CPU(u8, irq_work_pending); |
89 | 89 |
|
90 | | -#define set_perf_event_pending_flag() __get_cpu_var(perf_event_pending) = 1 |
91 | | -#define test_perf_event_pending() __get_cpu_var(perf_event_pending) |
92 | | -#define clear_perf_event_pending() __get_cpu_var(perf_event_pending) = 0 |
| 90 | +#define set_irq_work_pending_flag() __get_cpu_var(irq_work_pending) = 1 |
| 91 | +#define test_irq_work_pending() __get_cpu_var(irq_work_pending) |
| 92 | +#define clear_irq_work_pending() __get_cpu_var(irq_work_pending) = 0 |
93 | 93 |
|
94 | | -void set_perf_event_pending(void) |
| 94 | +void set_irq_work_pending(void) |
95 | 95 | { |
96 | | - set_perf_event_pending_flag(); |
| 96 | + set_irq_work_pending_flag(); |
97 | 97 | } |
98 | 98 |
|
99 | | -#else /* CONFIG_PERF_EVENTS */ |
| 99 | +#else /* CONFIG_IRQ_WORK */ |
100 | 100 |
|
101 | | -#define test_perf_event_pending() 0 |
102 | | -#define clear_perf_event_pending() |
| 101 | +#define test_irq_work_pending() 0 |
| 102 | +#define clear_irq_work_pending() |
103 | 103 |
|
104 | | -#endif /* CONFIG_PERF_EVENTS */ |
| 104 | +#endif /* CONFIG_IRQ_WORK */ |
105 | 105 |
|
106 | 106 |
|
107 | 107 | static inline __u32 rpcc(void) |
@@ -191,9 +191,9 @@ irqreturn_t timer_interrupt(int irq, void *dev) |
191 | 191 |
|
192 | 192 | write_sequnlock(&xtime_lock); |
193 | 193 |
|
194 | | - if (test_perf_event_pending()) { |
195 | | - clear_perf_event_pending(); |
196 | | - perf_event_do_pending(); |
| 194 | + if (test_irq_work_pending()) { |
| 195 | + clear_irq_work_pending(); |
| 196 | + irq_work_run(); |
197 | 197 | } |
198 | 198 |
|
199 | 199 | #ifndef CONFIG_SMP |
|
0 commit comments