diff options
Diffstat (limited to 'kernel/time/tick-common.c')
-rw-r--r-- | kernel/time/tick-common.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index b6b898d2eeef..119528de8235 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/percpu.h> | 18 | #include <linux/percpu.h> |
19 | #include <linux/profile.h> | 19 | #include <linux/profile.h> |
20 | #include <linux/sched.h> | 20 | #include <linux/sched.h> |
21 | #include <linux/tick.h> | ||
22 | 21 | ||
23 | #include <asm/irq_regs.h> | 22 | #include <asm/irq_regs.h> |
24 | 23 | ||
@@ -49,9 +48,13 @@ struct tick_device *tick_get_device(int cpu) | |||
49 | */ | 48 | */ |
50 | int tick_is_oneshot_available(void) | 49 | int tick_is_oneshot_available(void) |
51 | { | 50 | { |
52 | struct clock_event_device *dev = __get_cpu_var(tick_cpu_device).evtdev; | 51 | struct clock_event_device *dev = __this_cpu_read(tick_cpu_device.evtdev); |
53 | 52 | ||
54 | return dev && (dev->features & CLOCK_EVT_FEAT_ONESHOT); | 53 | if (!dev || !(dev->features & CLOCK_EVT_FEAT_ONESHOT)) |
54 | return 0; | ||
55 | if (!(dev->features & CLOCK_EVT_FEAT_C3STOP)) | ||
56 | return 1; | ||
57 | return tick_broadcast_oneshot_available(); | ||
55 | } | 58 | } |
56 | 59 | ||
57 | /* | 60 | /* |