diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-15 17:05:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-15 17:05:17 -0400 |
commit | cc51bf6e6d8b03bd459818492e0bc3bef09dcd74 (patch) | |
tree | 1df4cddf95a656e829242dfb89f29cf22259ca70 | |
parent | 37cae5e24981f4619372e6a29456d34e4cbdc5e2 (diff) | |
parent | b4f711ee03d28f776fd2324fd0bd999cc428e4d2 (diff) |
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner:
- Cure for not using zalloc in the first place, which leads to random
crashes with CPUMASK_OFF_STACK.
- Revert a user space visible change which broke udev
- Add a missing cpu_online early return introduced by the new full
dyntick conversions
- Plug a long standing race in the timer wheel cpu hotplug code.
Sigh...
- Cleanup NOHZ per cpu data on cpu down to prevent stale data on cpu
up.
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
time: Revert ALWAYS_USE_PERSISTENT_CLOCK compile time optimizaitons
timer: Don't reinitialize the cpu base lock during CPU_UP_PREPARE
tick: Don't invoke tick_nohz_stop_sched_tick() if the cpu is offline
tick: Cleanup NOHZ per cpu data on cpu down
tick: Use zalloc_cpumask_var for allocating offstack cpumasks
-rw-r--r-- | arch/x86/Kconfig | 1 | ||||
-rw-r--r-- | drivers/rtc/Kconfig | 2 | ||||
-rw-r--r-- | include/linux/time.h | 4 | ||||
-rw-r--r-- | kernel/time/Kconfig | 5 | ||||
-rw-r--r-- | kernel/time/tick-broadcast.c | 10 | ||||
-rw-r--r-- | kernel/time/tick-sched.c | 3 | ||||
-rw-r--r-- | kernel/timer.c | 2 |
7 files changed, 8 insertions, 19 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 6a154a91c7e7..685692c94f05 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -108,7 +108,6 @@ config X86 | |||
108 | select GENERIC_CLOCKEVENTS_BROADCAST if X86_64 || (X86_32 && X86_LOCAL_APIC) | 108 | select GENERIC_CLOCKEVENTS_BROADCAST if X86_64 || (X86_32 && X86_LOCAL_APIC) |
109 | select GENERIC_TIME_VSYSCALL if X86_64 | 109 | select GENERIC_TIME_VSYSCALL if X86_64 |
110 | select KTIME_SCALAR if X86_32 | 110 | select KTIME_SCALAR if X86_32 |
111 | select ALWAYS_USE_PERSISTENT_CLOCK | ||
112 | select GENERIC_STRNCPY_FROM_USER | 111 | select GENERIC_STRNCPY_FROM_USER |
113 | select GENERIC_STRNLEN_USER | 112 | select GENERIC_STRNLEN_USER |
114 | select HAVE_CONTEXT_TRACKING if X86_64 | 113 | select HAVE_CONTEXT_TRACKING if X86_64 |
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 0c81915b1997..b9838130a7b0 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig | |||
@@ -20,7 +20,6 @@ if RTC_CLASS | |||
20 | config RTC_HCTOSYS | 20 | config RTC_HCTOSYS |
21 | bool "Set system time from RTC on startup and resume" | 21 | bool "Set system time from RTC on startup and resume" |
22 | default y | 22 | default y |
23 | depends on !ALWAYS_USE_PERSISTENT_CLOCK | ||
24 | help | 23 | help |
25 | If you say yes here, the system time (wall clock) will be set using | 24 | If you say yes here, the system time (wall clock) will be set using |
26 | the value read from a specified RTC device. This is useful to avoid | 25 | the value read from a specified RTC device. This is useful to avoid |
@@ -29,7 +28,6 @@ config RTC_HCTOSYS | |||
29 | config RTC_SYSTOHC | 28 | config RTC_SYSTOHC |
30 | bool "Set the RTC time based on NTP synchronization" | 29 | bool "Set the RTC time based on NTP synchronization" |
31 | default y | 30 | default y |
32 | depends on !ALWAYS_USE_PERSISTENT_CLOCK | ||
33 | help | 31 | help |
34 | If you say yes here, the system time (wall clock) will be stored | 32 | If you say yes here, the system time (wall clock) will be stored |
35 | in the RTC specified by RTC_HCTOSYS_DEVICE approximately every 11 | 33 | in the RTC specified by RTC_HCTOSYS_DEVICE approximately every 11 |
diff --git a/include/linux/time.h b/include/linux/time.h index 22d81b3c955b..d5d229b2e5af 100644 --- a/include/linux/time.h +++ b/include/linux/time.h | |||
@@ -117,14 +117,10 @@ static inline bool timespec_valid_strict(const struct timespec *ts) | |||
117 | 117 | ||
118 | extern bool persistent_clock_exist; | 118 | extern bool persistent_clock_exist; |
119 | 119 | ||
120 | #ifdef ALWAYS_USE_PERSISTENT_CLOCK | ||
121 | #define has_persistent_clock() true | ||
122 | #else | ||
123 | static inline bool has_persistent_clock(void) | 120 | static inline bool has_persistent_clock(void) |
124 | { | 121 | { |
125 | return persistent_clock_exist; | 122 | return persistent_clock_exist; |
126 | } | 123 | } |
127 | #endif | ||
128 | 124 | ||
129 | extern void read_persistent_clock(struct timespec *ts); | 125 | extern void read_persistent_clock(struct timespec *ts); |
130 | extern void read_boot_clock(struct timespec *ts); | 126 | extern void read_boot_clock(struct timespec *ts); |
diff --git a/kernel/time/Kconfig b/kernel/time/Kconfig index e4c07b0692bb..70f27e89012b 100644 --- a/kernel/time/Kconfig +++ b/kernel/time/Kconfig | |||
@@ -12,11 +12,6 @@ config CLOCKSOURCE_WATCHDOG | |||
12 | config ARCH_CLOCKSOURCE_DATA | 12 | config ARCH_CLOCKSOURCE_DATA |
13 | bool | 13 | bool |
14 | 14 | ||
15 | # Platforms has a persistent clock | ||
16 | config ALWAYS_USE_PERSISTENT_CLOCK | ||
17 | bool | ||
18 | default n | ||
19 | |||
20 | # Timekeeping vsyscall support | 15 | # Timekeeping vsyscall support |
21 | config GENERIC_TIME_VSYSCALL | 16 | config GENERIC_TIME_VSYSCALL |
22 | bool | 17 | bool |
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index 206bbfb34e09..24938d577669 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
@@ -786,11 +786,11 @@ bool tick_broadcast_oneshot_available(void) | |||
786 | 786 | ||
787 | void __init tick_broadcast_init(void) | 787 | void __init tick_broadcast_init(void) |
788 | { | 788 | { |
789 | alloc_cpumask_var(&tick_broadcast_mask, GFP_NOWAIT); | 789 | zalloc_cpumask_var(&tick_broadcast_mask, GFP_NOWAIT); |
790 | alloc_cpumask_var(&tmpmask, GFP_NOWAIT); | 790 | zalloc_cpumask_var(&tmpmask, GFP_NOWAIT); |
791 | #ifdef CONFIG_TICK_ONESHOT | 791 | #ifdef CONFIG_TICK_ONESHOT |
792 | alloc_cpumask_var(&tick_broadcast_oneshot_mask, GFP_NOWAIT); | 792 | zalloc_cpumask_var(&tick_broadcast_oneshot_mask, GFP_NOWAIT); |
793 | alloc_cpumask_var(&tick_broadcast_pending_mask, GFP_NOWAIT); | 793 | zalloc_cpumask_var(&tick_broadcast_pending_mask, GFP_NOWAIT); |
794 | alloc_cpumask_var(&tick_broadcast_force_mask, GFP_NOWAIT); | 794 | zalloc_cpumask_var(&tick_broadcast_force_mask, GFP_NOWAIT); |
795 | #endif | 795 | #endif |
796 | } | 796 | } |
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index bc67d4245e1d..f4208138fbf4 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -717,6 +717,7 @@ static bool can_stop_idle_tick(int cpu, struct tick_sched *ts) | |||
717 | if (unlikely(!cpu_online(cpu))) { | 717 | if (unlikely(!cpu_online(cpu))) { |
718 | if (cpu == tick_do_timer_cpu) | 718 | if (cpu == tick_do_timer_cpu) |
719 | tick_do_timer_cpu = TICK_DO_TIMER_NONE; | 719 | tick_do_timer_cpu = TICK_DO_TIMER_NONE; |
720 | return false; | ||
720 | } | 721 | } |
721 | 722 | ||
722 | if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE)) | 723 | if (unlikely(ts->nohz_mode == NOHZ_MODE_INACTIVE)) |
@@ -1168,7 +1169,7 @@ void tick_cancel_sched_timer(int cpu) | |||
1168 | hrtimer_cancel(&ts->sched_timer); | 1169 | hrtimer_cancel(&ts->sched_timer); |
1169 | # endif | 1170 | # endif |
1170 | 1171 | ||
1171 | ts->nohz_mode = NOHZ_MODE_INACTIVE; | 1172 | memset(ts, 0, sizeof(*ts)); |
1172 | } | 1173 | } |
1173 | #endif | 1174 | #endif |
1174 | 1175 | ||
diff --git a/kernel/timer.c b/kernel/timer.c index a860bba34412..15ffdb3f1948 100644 --- a/kernel/timer.c +++ b/kernel/timer.c | |||
@@ -1539,12 +1539,12 @@ static int __cpuinit init_timers_cpu(int cpu) | |||
1539 | boot_done = 1; | 1539 | boot_done = 1; |
1540 | base = &boot_tvec_bases; | 1540 | base = &boot_tvec_bases; |
1541 | } | 1541 | } |
1542 | spin_lock_init(&base->lock); | ||
1542 | tvec_base_done[cpu] = 1; | 1543 | tvec_base_done[cpu] = 1; |
1543 | } else { | 1544 | } else { |
1544 | base = per_cpu(tvec_bases, cpu); | 1545 | base = per_cpu(tvec_bases, cpu); |
1545 | } | 1546 | } |
1546 | 1547 | ||
1547 | spin_lock_init(&base->lock); | ||
1548 | 1548 | ||
1549 | for (j = 0; j < TVN_SIZE; j++) { | 1549 | for (j = 0; j < TVN_SIZE; j++) { |
1550 | INIT_LIST_HEAD(base->tv5.vec + j); | 1550 | INIT_LIST_HEAD(base->tv5.vec + j); |