diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-19 12:17:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-08-19 12:17:35 -0400 |
commit | e91dade52b590d821e83bb494df20c93e5384790 (patch) | |
tree | 256ed456cb1d21776624020485ce1a79814db29d /kernel | |
parent | fbf21849edaf0cd2a9b33307ab965757a93b8d75 (diff) | |
parent | ae920eb24277e4a174a3ca575ce42b98b18a6748 (diff) |
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Ingo Molnar:
"Three small fixlets"
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
nohz: fix compile warning in tick_nohz_init()
nohz: Do not warn about unstable tsc unless user uses nohz_full
sched_clock: Fix integer overflow
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/sched_clock.c | 2 | ||||
-rw-r--r-- | kernel/time/tick-sched.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/kernel/time/sched_clock.c b/kernel/time/sched_clock.c index a326f27d7f09..0b479a6a22bb 100644 --- a/kernel/time/sched_clock.c +++ b/kernel/time/sched_clock.c | |||
@@ -121,7 +121,7 @@ void __init setup_sched_clock(u32 (*read)(void), int bits, unsigned long rate) | |||
121 | BUG_ON(bits > 32); | 121 | BUG_ON(bits > 32); |
122 | WARN_ON(!irqs_disabled()); | 122 | WARN_ON(!irqs_disabled()); |
123 | read_sched_clock = read; | 123 | read_sched_clock = read; |
124 | sched_clock_mask = (1 << bits) - 1; | 124 | sched_clock_mask = (1ULL << bits) - 1; |
125 | cd.rate = rate; | 125 | cd.rate = rate; |
126 | 126 | ||
127 | /* calculate the mult/shift to convert counter ticks to ns. */ | 127 | /* calculate the mult/shift to convert counter ticks to ns. */ |
diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c index e77edc97e036..e8a1516cc0a3 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c | |||
@@ -182,7 +182,8 @@ static bool can_stop_full_tick(void) | |||
182 | * Don't allow the user to think they can get | 182 | * Don't allow the user to think they can get |
183 | * full NO_HZ with this machine. | 183 | * full NO_HZ with this machine. |
184 | */ | 184 | */ |
185 | WARN_ONCE(1, "NO_HZ FULL will not work with unstable sched clock"); | 185 | WARN_ONCE(have_nohz_full_mask, |
186 | "NO_HZ FULL will not work with unstable sched clock"); | ||
186 | return false; | 187 | return false; |
187 | } | 188 | } |
188 | #endif | 189 | #endif |
@@ -343,8 +344,6 @@ static int tick_nohz_init_all(void) | |||
343 | 344 | ||
344 | void __init tick_nohz_init(void) | 345 | void __init tick_nohz_init(void) |
345 | { | 346 | { |
346 | int cpu; | ||
347 | |||
348 | if (!have_nohz_full_mask) { | 347 | if (!have_nohz_full_mask) { |
349 | if (tick_nohz_init_all() < 0) | 348 | if (tick_nohz_init_all() < 0) |
350 | return; | 349 | return; |