diff options
-rw-r--r-- | include/linux/clockchips.h | 8 | ||||
-rw-r--r-- | kernel/time/Kconfig | 5 | ||||
-rw-r--r-- | kernel/time/Makefile | 2 | ||||
-rw-r--r-- | kernel/time/clockevents.c | 3 |
4 files changed, 14 insertions, 4 deletions
diff --git a/include/linux/clockchips.h b/include/linux/clockchips.h index f368a6fe8cc9..d2ddea926895 100644 --- a/include/linux/clockchips.h +++ b/include/linux/clockchips.h | |||
@@ -8,7 +8,7 @@ | |||
8 | #ifndef _LINUX_CLOCKCHIPS_H | 8 | #ifndef _LINUX_CLOCKCHIPS_H |
9 | #define _LINUX_CLOCKCHIPS_H | 9 | #define _LINUX_CLOCKCHIPS_H |
10 | 10 | ||
11 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | 11 | #ifdef CONFIG_GENERIC_CLOCKEVENTS_BUILD |
12 | 12 | ||
13 | #include <linux/clocksource.h> | 13 | #include <linux/clocksource.h> |
14 | #include <linux/cpumask.h> | 14 | #include <linux/cpumask.h> |
@@ -126,9 +126,13 @@ extern int clockevents_register_notifier(struct notifier_block *nb); | |||
126 | extern int clockevents_program_event(struct clock_event_device *dev, | 126 | extern int clockevents_program_event(struct clock_event_device *dev, |
127 | ktime_t expires, ktime_t now); | 127 | ktime_t expires, ktime_t now); |
128 | 128 | ||
129 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | ||
129 | extern void clockevents_notify(unsigned long reason, void *arg); | 130 | extern void clockevents_notify(unsigned long reason, void *arg); |
130 | |||
131 | #else | 131 | #else |
132 | # define clockevents_notify(reason, arg) do { } while (0) | ||
133 | #endif | ||
134 | |||
135 | #else /* CONFIG_GENERIC_CLOCKEVENTS_BUILD */ | ||
132 | 136 | ||
133 | #define clockevents_notify(reason, arg) do { } while (0) | 137 | #define clockevents_notify(reason, arg) do { } while (0) |
134 | 138 | ||
diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig index f66351126544..8d53106a0a92 100644 --- a/kernel/time/Kconfig +++ b/kernel/time/Kconfig | |||
@@ -23,3 +23,8 @@ config HIGH_RES_TIMERS | |||
23 | hardware is not capable then this option only increases | 23 | hardware is not capable then this option only increases |
24 | the size of the kernel image. | 24 | the size of the kernel image. |
25 | 25 | ||
26 | config GENERIC_CLOCKEVENTS_BUILD | ||
27 | bool | ||
28 | default y | ||
29 | depends on GENERIC_CLOCKEVENTS || GENERIC_CLOCKEVENTS_MIGR | ||
30 | |||
diff --git a/kernel/time/Makefile b/kernel/time/Makefile index 99b6034fc86b..905b0b50792d 100644 --- a/kernel/time/Makefile +++ b/kernel/time/Makefile | |||
@@ -1,6 +1,6 @@ | |||
1 | obj-y += timekeeping.o ntp.o clocksource.o jiffies.o timer_list.o | 1 | obj-y += timekeeping.o ntp.o clocksource.o jiffies.o timer_list.o |
2 | 2 | ||
3 | obj-$(CONFIG_GENERIC_CLOCKEVENTS) += clockevents.o | 3 | obj-$(CONFIG_GENERIC_CLOCKEVENTS_BUILD) += clockevents.o |
4 | obj-$(CONFIG_GENERIC_CLOCKEVENTS) += tick-common.o | 4 | obj-$(CONFIG_GENERIC_CLOCKEVENTS) += tick-common.o |
5 | obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += tick-broadcast.o | 5 | obj-$(CONFIG_GENERIC_CLOCKEVENTS_BROADCAST) += tick-broadcast.o |
6 | obj-$(CONFIG_TICK_ONESHOT) += tick-oneshot.o | 6 | obj-$(CONFIG_TICK_ONESHOT) += tick-oneshot.o |
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 41dd3105ce7f..822beebe664a 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c | |||
@@ -194,6 +194,7 @@ void clockevents_exchange_device(struct clock_event_device *old, | |||
194 | local_irq_restore(flags); | 194 | local_irq_restore(flags); |
195 | } | 195 | } |
196 | 196 | ||
197 | #ifdef CONFIG_GENERIC_CLOCKEVENTS | ||
197 | /** | 198 | /** |
198 | * clockevents_notify - notification about relevant events | 199 | * clockevents_notify - notification about relevant events |
199 | */ | 200 | */ |
@@ -222,4 +223,4 @@ void clockevents_notify(unsigned long reason, void *arg) | |||
222 | spin_unlock(&clockevents_lock); | 223 | spin_unlock(&clockevents_lock); |
223 | } | 224 | } |
224 | EXPORT_SYMBOL_GPL(clockevents_notify); | 225 | EXPORT_SYMBOL_GPL(clockevents_notify); |
225 | 226 | #endif | |