diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-15 12:02:01 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-15 12:02:01 -0500 |
commit | 8f0ddf91f2aeb09602373e400cf8b403e9017210 (patch) | |
tree | b907c35c79caadafff6ad46a91614e30afd2f967 /kernel/time | |
parent | 050cbb09dac0402672edeaeac06094ef8ff1749a (diff) | |
parent | b5f91da0a6973bb6f9ff3b91b0e92c0773a458f3 (diff) |
Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (26 commits)
clockevents: Convert to raw_spinlock
clockevents: Make tick_device_lock static
debugobjects: Convert to raw_spinlocks
perf_event: Convert to raw_spinlock
hrtimers: Convert to raw_spinlocks
genirq: Convert irq_desc.lock to raw_spinlock
smp: Convert smplocks to raw_spinlocks
rtmutes: Convert rtmutex.lock to raw_spinlock
sched: Convert pi_lock to raw_spinlock
sched: Convert cpupri lock to raw_spinlock
sched: Convert rt_runtime_lock to raw_spinlock
sched: Convert rq->lock to raw_spinlock
plist: Make plist debugging raw_spinlock aware
bkl: Fixup core_lock fallout
locking: Cleanup the name space completely
locking: Further name space cleanups
alpha: Fix fallout from locking changes
locking: Implement new raw_spinlock
locking: Convert raw_rwlock functions to arch_rwlock
locking: Convert raw_rwlock to arch_rwlock
...
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/clockevents.c | 14 | ||||
-rw-r--r-- | kernel/time/tick-broadcast.c | 42 | ||||
-rw-r--r-- | kernel/time/tick-common.c | 20 | ||||
-rw-r--r-- | kernel/time/tick-internal.h | 1 | ||||
-rw-r--r-- | kernel/time/timer_list.c | 6 | ||||
-rw-r--r-- | kernel/time/timer_stats.c | 17 |
6 files changed, 50 insertions, 50 deletions
diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 20a8920029ee..3d5fc0fd1cca 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c | |||
@@ -30,7 +30,7 @@ static LIST_HEAD(clockevents_released); | |||
30 | static RAW_NOTIFIER_HEAD(clockevents_chain); | 30 | static RAW_NOTIFIER_HEAD(clockevents_chain); |
31 | 31 | ||
32 | /* Protection for the above */ | 32 | /* Protection for the above */ |
33 | static DEFINE_SPINLOCK(clockevents_lock); | 33 | static DEFINE_RAW_SPINLOCK(clockevents_lock); |
34 | 34 | ||
35 | /** | 35 | /** |
36 | * clockevents_delta2ns - Convert a latch value (device ticks) to nanoseconds | 36 | * clockevents_delta2ns - Convert a latch value (device ticks) to nanoseconds |
@@ -141,9 +141,9 @@ int clockevents_register_notifier(struct notifier_block *nb) | |||
141 | unsigned long flags; | 141 | unsigned long flags; |
142 | int ret; | 142 | int ret; |
143 | 143 | ||
144 | spin_lock_irqsave(&clockevents_lock, flags); | 144 | raw_spin_lock_irqsave(&clockevents_lock, flags); |
145 | ret = raw_notifier_chain_register(&clockevents_chain, nb); | 145 | ret = raw_notifier_chain_register(&clockevents_chain, nb); |
146 | spin_unlock_irqrestore(&clockevents_lock, flags); | 146 | raw_spin_unlock_irqrestore(&clockevents_lock, flags); |
147 | 147 | ||
148 | return ret; | 148 | return ret; |
149 | } | 149 | } |
@@ -185,13 +185,13 @@ void clockevents_register_device(struct clock_event_device *dev) | |||
185 | BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED); | 185 | BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED); |
186 | BUG_ON(!dev->cpumask); | 186 | BUG_ON(!dev->cpumask); |
187 | 187 | ||
188 | spin_lock_irqsave(&clockevents_lock, flags); | 188 | raw_spin_lock_irqsave(&clockevents_lock, flags); |
189 | 189 | ||
190 | list_add(&dev->list, &clockevent_devices); | 190 | list_add(&dev->list, &clockevent_devices); |
191 | clockevents_do_notify(CLOCK_EVT_NOTIFY_ADD, dev); | 191 | clockevents_do_notify(CLOCK_EVT_NOTIFY_ADD, dev); |
192 | clockevents_notify_released(); | 192 | clockevents_notify_released(); |
193 | 193 | ||
194 | spin_unlock_irqrestore(&clockevents_lock, flags); | 194 | raw_spin_unlock_irqrestore(&clockevents_lock, flags); |
195 | } | 195 | } |
196 | EXPORT_SYMBOL_GPL(clockevents_register_device); | 196 | EXPORT_SYMBOL_GPL(clockevents_register_device); |
197 | 197 | ||
@@ -241,7 +241,7 @@ void clockevents_notify(unsigned long reason, void *arg) | |||
241 | struct list_head *node, *tmp; | 241 | struct list_head *node, *tmp; |
242 | unsigned long flags; | 242 | unsigned long flags; |
243 | 243 | ||
244 | spin_lock_irqsave(&clockevents_lock, flags); | 244 | raw_spin_lock_irqsave(&clockevents_lock, flags); |
245 | clockevents_do_notify(reason, arg); | 245 | clockevents_do_notify(reason, arg); |
246 | 246 | ||
247 | switch (reason) { | 247 | switch (reason) { |
@@ -256,7 +256,7 @@ void clockevents_notify(unsigned long reason, void *arg) | |||
256 | default: | 256 | default: |
257 | break; | 257 | break; |
258 | } | 258 | } |
259 | spin_unlock_irqrestore(&clockevents_lock, flags); | 259 | raw_spin_unlock_irqrestore(&clockevents_lock, flags); |
260 | } | 260 | } |
261 | EXPORT_SYMBOL_GPL(clockevents_notify); | 261 | EXPORT_SYMBOL_GPL(clockevents_notify); |
262 | #endif | 262 | #endif |
diff --git a/kernel/time/tick-broadcast.c b/kernel/time/tick-broadcast.c index c2ec25087a35..b3bafd5fc66d 100644 --- a/kernel/time/tick-broadcast.c +++ b/kernel/time/tick-broadcast.c | |||
@@ -31,7 +31,7 @@ static struct tick_device tick_broadcast_device; | |||
31 | /* FIXME: Use cpumask_var_t. */ | 31 | /* FIXME: Use cpumask_var_t. */ |
32 | static DECLARE_BITMAP(tick_broadcast_mask, NR_CPUS); | 32 | static DECLARE_BITMAP(tick_broadcast_mask, NR_CPUS); |
33 | static DECLARE_BITMAP(tmpmask, NR_CPUS); | 33 | static DECLARE_BITMAP(tmpmask, NR_CPUS); |
34 | static DEFINE_SPINLOCK(tick_broadcast_lock); | 34 | static DEFINE_RAW_SPINLOCK(tick_broadcast_lock); |
35 | static int tick_broadcast_force; | 35 | static int tick_broadcast_force; |
36 | 36 | ||
37 | #ifdef CONFIG_TICK_ONESHOT | 37 | #ifdef CONFIG_TICK_ONESHOT |
@@ -96,7 +96,7 @@ int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu) | |||
96 | unsigned long flags; | 96 | unsigned long flags; |
97 | int ret = 0; | 97 | int ret = 0; |
98 | 98 | ||
99 | spin_lock_irqsave(&tick_broadcast_lock, flags); | 99 | raw_spin_lock_irqsave(&tick_broadcast_lock, flags); |
100 | 100 | ||
101 | /* | 101 | /* |
102 | * Devices might be registered with both periodic and oneshot | 102 | * Devices might be registered with both periodic and oneshot |
@@ -122,7 +122,7 @@ int tick_device_uses_broadcast(struct clock_event_device *dev, int cpu) | |||
122 | tick_broadcast_clear_oneshot(cpu); | 122 | tick_broadcast_clear_oneshot(cpu); |
123 | } | 123 | } |
124 | } | 124 | } |
125 | spin_unlock_irqrestore(&tick_broadcast_lock, flags); | 125 | raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags); |
126 | return ret; | 126 | return ret; |
127 | } | 127 | } |
128 | 128 | ||
@@ -161,13 +161,13 @@ static void tick_do_broadcast(struct cpumask *mask) | |||
161 | */ | 161 | */ |
162 | static void tick_do_periodic_broadcast(void) | 162 | static void tick_do_periodic_broadcast(void) |
163 | { | 163 | { |
164 | spin_lock(&tick_broadcast_lock); | 164 | raw_spin_lock(&tick_broadcast_lock); |
165 | 165 | ||
166 | cpumask_and(to_cpumask(tmpmask), | 166 | cpumask_and(to_cpumask(tmpmask), |
167 | cpu_online_mask, tick_get_broadcast_mask()); | 167 | cpu_online_mask, tick_get_broadcast_mask()); |
168 | tick_do_broadcast(to_cpumask(tmpmask)); | 168 | tick_do_broadcast(to_cpumask(tmpmask)); |
169 | 169 | ||
170 | spin_unlock(&tick_broadcast_lock); | 170 | raw_spin_unlock(&tick_broadcast_lock); |
171 | } | 171 | } |
172 | 172 | ||
173 | /* | 173 | /* |
@@ -212,7 +212,7 @@ static void tick_do_broadcast_on_off(unsigned long *reason) | |||
212 | unsigned long flags; | 212 | unsigned long flags; |
213 | int cpu, bc_stopped; | 213 | int cpu, bc_stopped; |
214 | 214 | ||
215 | spin_lock_irqsave(&tick_broadcast_lock, flags); | 215 | raw_spin_lock_irqsave(&tick_broadcast_lock, flags); |
216 | 216 | ||
217 | cpu = smp_processor_id(); | 217 | cpu = smp_processor_id(); |
218 | td = &per_cpu(tick_cpu_device, cpu); | 218 | td = &per_cpu(tick_cpu_device, cpu); |
@@ -263,7 +263,7 @@ static void tick_do_broadcast_on_off(unsigned long *reason) | |||
263 | tick_broadcast_setup_oneshot(bc); | 263 | tick_broadcast_setup_oneshot(bc); |
264 | } | 264 | } |
265 | out: | 265 | out: |
266 | spin_unlock_irqrestore(&tick_broadcast_lock, flags); | 266 | raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags); |
267 | } | 267 | } |
268 | 268 | ||
269 | /* | 269 | /* |
@@ -299,7 +299,7 @@ void tick_shutdown_broadcast(unsigned int *cpup) | |||
299 | unsigned long flags; | 299 | unsigned long flags; |
300 | unsigned int cpu = *cpup; | 300 | unsigned int cpu = *cpup; |
301 | 301 | ||
302 | spin_lock_irqsave(&tick_broadcast_lock, flags); | 302 | raw_spin_lock_irqsave(&tick_broadcast_lock, flags); |
303 | 303 | ||
304 | bc = tick_broadcast_device.evtdev; | 304 | bc = tick_broadcast_device.evtdev; |
305 | cpumask_clear_cpu(cpu, tick_get_broadcast_mask()); | 305 | cpumask_clear_cpu(cpu, tick_get_broadcast_mask()); |
@@ -309,7 +309,7 @@ void tick_shutdown_broadcast(unsigned int *cpup) | |||
309 | clockevents_shutdown(bc); | 309 | clockevents_shutdown(bc); |
310 | } | 310 | } |
311 | 311 | ||
312 | spin_unlock_irqrestore(&tick_broadcast_lock, flags); | 312 | raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags); |
313 | } | 313 | } |
314 | 314 | ||
315 | void tick_suspend_broadcast(void) | 315 | void tick_suspend_broadcast(void) |
@@ -317,13 +317,13 @@ void tick_suspend_broadcast(void) | |||
317 | struct clock_event_device *bc; | 317 | struct clock_event_device *bc; |
318 | unsigned long flags; | 318 | unsigned long flags; |
319 | 319 | ||
320 | spin_lock_irqsave(&tick_broadcast_lock, flags); | 320 | raw_spin_lock_irqsave(&tick_broadcast_lock, flags); |
321 | 321 | ||
322 | bc = tick_broadcast_device.evtdev; | 322 | bc = tick_broadcast_device.evtdev; |
323 | if (bc) | 323 | if (bc) |
324 | clockevents_shutdown(bc); | 324 | clockevents_shutdown(bc); |
325 | 325 | ||
326 | spin_unlock_irqrestore(&tick_broadcast_lock, flags); | 326 | raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags); |
327 | } | 327 | } |
328 | 328 | ||
329 | int tick_resume_broadcast(void) | 329 | int tick_resume_broadcast(void) |
@@ -332,7 +332,7 @@ int tick_resume_broadcast(void) | |||
332 | unsigned long flags; | 332 | unsigned long flags; |
333 | int broadcast = 0; | 333 | int broadcast = 0; |
334 | 334 | ||
335 | spin_lock_irqsave(&tick_broadcast_lock, flags); | 335 | raw_spin_lock_irqsave(&tick_broadcast_lock, flags); |
336 | 336 | ||
337 | bc = tick_broadcast_device.evtdev; | 337 | bc = tick_broadcast_device.evtdev; |
338 | 338 | ||
@@ -351,7 +351,7 @@ int tick_resume_broadcast(void) | |||
351 | break; | 351 | break; |
352 | } | 352 | } |
353 | } | 353 | } |
354 | spin_unlock_irqrestore(&tick_broadcast_lock, flags); | 354 | raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags); |
355 | 355 | ||
356 | return broadcast; | 356 | return broadcast; |
357 | } | 357 | } |
@@ -405,7 +405,7 @@ static void tick_handle_oneshot_broadcast(struct clock_event_device *dev) | |||
405 | ktime_t now, next_event; | 405 | ktime_t now, next_event; |
406 | int cpu; | 406 | int cpu; |
407 | 407 | ||
408 | spin_lock(&tick_broadcast_lock); | 408 | raw_spin_lock(&tick_broadcast_lock); |
409 | again: | 409 | again: |
410 | dev->next_event.tv64 = KTIME_MAX; | 410 | dev->next_event.tv64 = KTIME_MAX; |
411 | next_event.tv64 = KTIME_MAX; | 411 | next_event.tv64 = KTIME_MAX; |
@@ -443,7 +443,7 @@ again: | |||
443 | if (tick_broadcast_set_event(next_event, 0)) | 443 | if (tick_broadcast_set_event(next_event, 0)) |
444 | goto again; | 444 | goto again; |
445 | } | 445 | } |
446 | spin_unlock(&tick_broadcast_lock); | 446 | raw_spin_unlock(&tick_broadcast_lock); |
447 | } | 447 | } |
448 | 448 | ||
449 | /* | 449 | /* |
@@ -457,7 +457,7 @@ void tick_broadcast_oneshot_control(unsigned long reason) | |||
457 | unsigned long flags; | 457 | unsigned long flags; |
458 | int cpu; | 458 | int cpu; |
459 | 459 | ||
460 | spin_lock_irqsave(&tick_broadcast_lock, flags); | 460 | raw_spin_lock_irqsave(&tick_broadcast_lock, flags); |
461 | 461 | ||
462 | /* | 462 | /* |
463 | * Periodic mode does not care about the enter/exit of power | 463 | * Periodic mode does not care about the enter/exit of power |
@@ -492,7 +492,7 @@ void tick_broadcast_oneshot_control(unsigned long reason) | |||
492 | } | 492 | } |
493 | 493 | ||
494 | out: | 494 | out: |
495 | spin_unlock_irqrestore(&tick_broadcast_lock, flags); | 495 | raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags); |
496 | } | 496 | } |
497 | 497 | ||
498 | /* | 498 | /* |
@@ -563,13 +563,13 @@ void tick_broadcast_switch_to_oneshot(void) | |||
563 | struct clock_event_device *bc; | 563 | struct clock_event_device *bc; |
564 | unsigned long flags; | 564 | unsigned long flags; |
565 | 565 | ||
566 | spin_lock_irqsave(&tick_broadcast_lock, flags); | 566 | raw_spin_lock_irqsave(&tick_broadcast_lock, flags); |
567 | 567 | ||
568 | tick_broadcast_device.mode = TICKDEV_MODE_ONESHOT; | 568 | tick_broadcast_device.mode = TICKDEV_MODE_ONESHOT; |
569 | bc = tick_broadcast_device.evtdev; | 569 | bc = tick_broadcast_device.evtdev; |
570 | if (bc) | 570 | if (bc) |
571 | tick_broadcast_setup_oneshot(bc); | 571 | tick_broadcast_setup_oneshot(bc); |
572 | spin_unlock_irqrestore(&tick_broadcast_lock, flags); | 572 | raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags); |
573 | } | 573 | } |
574 | 574 | ||
575 | 575 | ||
@@ -581,7 +581,7 @@ void tick_shutdown_broadcast_oneshot(unsigned int *cpup) | |||
581 | unsigned long flags; | 581 | unsigned long flags; |
582 | unsigned int cpu = *cpup; | 582 | unsigned int cpu = *cpup; |
583 | 583 | ||
584 | spin_lock_irqsave(&tick_broadcast_lock, flags); | 584 | raw_spin_lock_irqsave(&tick_broadcast_lock, flags); |
585 | 585 | ||
586 | /* | 586 | /* |
587 | * Clear the broadcast mask flag for the dead cpu, but do not | 587 | * Clear the broadcast mask flag for the dead cpu, but do not |
@@ -589,7 +589,7 @@ void tick_shutdown_broadcast_oneshot(unsigned int *cpup) | |||
589 | */ | 589 | */ |
590 | cpumask_clear_cpu(cpu, tick_get_broadcast_oneshot_mask()); | 590 | cpumask_clear_cpu(cpu, tick_get_broadcast_oneshot_mask()); |
591 | 591 | ||
592 | spin_unlock_irqrestore(&tick_broadcast_lock, flags); | 592 | raw_spin_unlock_irqrestore(&tick_broadcast_lock, flags); |
593 | } | 593 | } |
594 | 594 | ||
595 | /* | 595 | /* |
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 83c4417b6a3c..b6b898d2eeef 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c | |||
@@ -34,7 +34,7 @@ DEFINE_PER_CPU(struct tick_device, tick_cpu_device); | |||
34 | ktime_t tick_next_period; | 34 | ktime_t tick_next_period; |
35 | ktime_t tick_period; | 35 | ktime_t tick_period; |
36 | int tick_do_timer_cpu __read_mostly = TICK_DO_TIMER_BOOT; | 36 | int tick_do_timer_cpu __read_mostly = TICK_DO_TIMER_BOOT; |
37 | DEFINE_SPINLOCK(tick_device_lock); | 37 | static DEFINE_RAW_SPINLOCK(tick_device_lock); |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * Debugging: see timer_list.c | 40 | * Debugging: see timer_list.c |
@@ -209,7 +209,7 @@ static int tick_check_new_device(struct clock_event_device *newdev) | |||
209 | int cpu, ret = NOTIFY_OK; | 209 | int cpu, ret = NOTIFY_OK; |
210 | unsigned long flags; | 210 | unsigned long flags; |
211 | 211 | ||
212 | spin_lock_irqsave(&tick_device_lock, flags); | 212 | raw_spin_lock_irqsave(&tick_device_lock, flags); |
213 | 213 | ||
214 | cpu = smp_processor_id(); | 214 | cpu = smp_processor_id(); |
215 | if (!cpumask_test_cpu(cpu, newdev->cpumask)) | 215 | if (!cpumask_test_cpu(cpu, newdev->cpumask)) |
@@ -268,7 +268,7 @@ static int tick_check_new_device(struct clock_event_device *newdev) | |||
268 | if (newdev->features & CLOCK_EVT_FEAT_ONESHOT) | 268 | if (newdev->features & CLOCK_EVT_FEAT_ONESHOT) |
269 | tick_oneshot_notify(); | 269 | tick_oneshot_notify(); |
270 | 270 | ||
271 | spin_unlock_irqrestore(&tick_device_lock, flags); | 271 | raw_spin_unlock_irqrestore(&tick_device_lock, flags); |
272 | return NOTIFY_STOP; | 272 | return NOTIFY_STOP; |
273 | 273 | ||
274 | out_bc: | 274 | out_bc: |
@@ -278,7 +278,7 @@ out_bc: | |||
278 | if (tick_check_broadcast_device(newdev)) | 278 | if (tick_check_broadcast_device(newdev)) |
279 | ret = NOTIFY_STOP; | 279 | ret = NOTIFY_STOP; |
280 | 280 | ||
281 | spin_unlock_irqrestore(&tick_device_lock, flags); | 281 | raw_spin_unlock_irqrestore(&tick_device_lock, flags); |
282 | 282 | ||
283 | return ret; | 283 | return ret; |
284 | } | 284 | } |
@@ -311,7 +311,7 @@ static void tick_shutdown(unsigned int *cpup) | |||
311 | struct clock_event_device *dev = td->evtdev; | 311 | struct clock_event_device *dev = td->evtdev; |
312 | unsigned long flags; | 312 | unsigned long flags; |
313 | 313 | ||
314 | spin_lock_irqsave(&tick_device_lock, flags); | 314 | raw_spin_lock_irqsave(&tick_device_lock, flags); |
315 | td->mode = TICKDEV_MODE_PERIODIC; | 315 | td->mode = TICKDEV_MODE_PERIODIC; |
316 | if (dev) { | 316 | if (dev) { |
317 | /* | 317 | /* |
@@ -322,7 +322,7 @@ static void tick_shutdown(unsigned int *cpup) | |||
322 | clockevents_exchange_device(dev, NULL); | 322 | clockevents_exchange_device(dev, NULL); |
323 | td->evtdev = NULL; | 323 | td->evtdev = NULL; |
324 | } | 324 | } |
325 | spin_unlock_irqrestore(&tick_device_lock, flags); | 325 | raw_spin_unlock_irqrestore(&tick_device_lock, flags); |
326 | } | 326 | } |
327 | 327 | ||
328 | static void tick_suspend(void) | 328 | static void tick_suspend(void) |
@@ -330,9 +330,9 @@ static void tick_suspend(void) | |||
330 | struct tick_device *td = &__get_cpu_var(tick_cpu_device); | 330 | struct tick_device *td = &__get_cpu_var(tick_cpu_device); |
331 | unsigned long flags; | 331 | unsigned long flags; |
332 | 332 | ||
333 | spin_lock_irqsave(&tick_device_lock, flags); | 333 | raw_spin_lock_irqsave(&tick_device_lock, flags); |
334 | clockevents_shutdown(td->evtdev); | 334 | clockevents_shutdown(td->evtdev); |
335 | spin_unlock_irqrestore(&tick_device_lock, flags); | 335 | raw_spin_unlock_irqrestore(&tick_device_lock, flags); |
336 | } | 336 | } |
337 | 337 | ||
338 | static void tick_resume(void) | 338 | static void tick_resume(void) |
@@ -341,7 +341,7 @@ static void tick_resume(void) | |||
341 | unsigned long flags; | 341 | unsigned long flags; |
342 | int broadcast = tick_resume_broadcast(); | 342 | int broadcast = tick_resume_broadcast(); |
343 | 343 | ||
344 | spin_lock_irqsave(&tick_device_lock, flags); | 344 | raw_spin_lock_irqsave(&tick_device_lock, flags); |
345 | clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_RESUME); | 345 | clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_RESUME); |
346 | 346 | ||
347 | if (!broadcast) { | 347 | if (!broadcast) { |
@@ -350,7 +350,7 @@ static void tick_resume(void) | |||
350 | else | 350 | else |
351 | tick_resume_oneshot(); | 351 | tick_resume_oneshot(); |
352 | } | 352 | } |
353 | spin_unlock_irqrestore(&tick_device_lock, flags); | 353 | raw_spin_unlock_irqrestore(&tick_device_lock, flags); |
354 | } | 354 | } |
355 | 355 | ||
356 | /* | 356 | /* |
diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h index b1c05bf75ee0..290eefbc1f60 100644 --- a/kernel/time/tick-internal.h +++ b/kernel/time/tick-internal.h | |||
@@ -6,7 +6,6 @@ | |||
6 | #define TICK_DO_TIMER_BOOT -2 | 6 | #define TICK_DO_TIMER_BOOT -2 |
7 | 7 | ||
8 | DECLARE_PER_CPU(struct tick_device, tick_cpu_device); | 8 | DECLARE_PER_CPU(struct tick_device, tick_cpu_device); |
9 | extern spinlock_t tick_device_lock; | ||
10 | extern ktime_t tick_next_period; | 9 | extern ktime_t tick_next_period; |
11 | extern ktime_t tick_period; | 10 | extern ktime_t tick_period; |
12 | extern int tick_do_timer_cpu __read_mostly; | 11 | extern int tick_do_timer_cpu __read_mostly; |
diff --git a/kernel/time/timer_list.c b/kernel/time/timer_list.c index 9d80db4747d4..28265636b6c2 100644 --- a/kernel/time/timer_list.c +++ b/kernel/time/timer_list.c | |||
@@ -84,7 +84,7 @@ print_active_timers(struct seq_file *m, struct hrtimer_clock_base *base, | |||
84 | 84 | ||
85 | next_one: | 85 | next_one: |
86 | i = 0; | 86 | i = 0; |
87 | spin_lock_irqsave(&base->cpu_base->lock, flags); | 87 | raw_spin_lock_irqsave(&base->cpu_base->lock, flags); |
88 | 88 | ||
89 | curr = base->first; | 89 | curr = base->first; |
90 | /* | 90 | /* |
@@ -100,13 +100,13 @@ next_one: | |||
100 | 100 | ||
101 | timer = rb_entry(curr, struct hrtimer, node); | 101 | timer = rb_entry(curr, struct hrtimer, node); |
102 | tmp = *timer; | 102 | tmp = *timer; |
103 | spin_unlock_irqrestore(&base->cpu_base->lock, flags); | 103 | raw_spin_unlock_irqrestore(&base->cpu_base->lock, flags); |
104 | 104 | ||
105 | print_timer(m, timer, &tmp, i, now); | 105 | print_timer(m, timer, &tmp, i, now); |
106 | next++; | 106 | next++; |
107 | goto next_one; | 107 | goto next_one; |
108 | } | 108 | } |
109 | spin_unlock_irqrestore(&base->cpu_base->lock, flags); | 109 | raw_spin_unlock_irqrestore(&base->cpu_base->lock, flags); |
110 | } | 110 | } |
111 | 111 | ||
112 | static void | 112 | static void |
diff --git a/kernel/time/timer_stats.c b/kernel/time/timer_stats.c index 63b117e9eba1..2f3b585b8d7d 100644 --- a/kernel/time/timer_stats.c +++ b/kernel/time/timer_stats.c | |||
@@ -86,7 +86,7 @@ static DEFINE_SPINLOCK(table_lock); | |||
86 | /* | 86 | /* |
87 | * Per-CPU lookup locks for fast hash lookup: | 87 | * Per-CPU lookup locks for fast hash lookup: |
88 | */ | 88 | */ |
89 | static DEFINE_PER_CPU(spinlock_t, tstats_lookup_lock); | 89 | static DEFINE_PER_CPU(raw_spinlock_t, tstats_lookup_lock); |
90 | 90 | ||
91 | /* | 91 | /* |
92 | * Mutex to serialize state changes with show-stats activities: | 92 | * Mutex to serialize state changes with show-stats activities: |
@@ -238,7 +238,7 @@ void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | |||
238 | /* | 238 | /* |
239 | * It doesnt matter which lock we take: | 239 | * It doesnt matter which lock we take: |
240 | */ | 240 | */ |
241 | spinlock_t *lock; | 241 | raw_spinlock_t *lock; |
242 | struct entry *entry, input; | 242 | struct entry *entry, input; |
243 | unsigned long flags; | 243 | unsigned long flags; |
244 | 244 | ||
@@ -253,7 +253,7 @@ void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | |||
253 | input.pid = pid; | 253 | input.pid = pid; |
254 | input.timer_flag = timer_flag; | 254 | input.timer_flag = timer_flag; |
255 | 255 | ||
256 | spin_lock_irqsave(lock, flags); | 256 | raw_spin_lock_irqsave(lock, flags); |
257 | if (!timer_stats_active) | 257 | if (!timer_stats_active) |
258 | goto out_unlock; | 258 | goto out_unlock; |
259 | 259 | ||
@@ -264,7 +264,7 @@ void timer_stats_update_stats(void *timer, pid_t pid, void *startf, | |||
264 | atomic_inc(&overflow_count); | 264 | atomic_inc(&overflow_count); |
265 | 265 | ||
266 | out_unlock: | 266 | out_unlock: |
267 | spin_unlock_irqrestore(lock, flags); | 267 | raw_spin_unlock_irqrestore(lock, flags); |
268 | } | 268 | } |
269 | 269 | ||
270 | static void print_name_offset(struct seq_file *m, unsigned long addr) | 270 | static void print_name_offset(struct seq_file *m, unsigned long addr) |
@@ -348,10 +348,11 @@ static void sync_access(void) | |||
348 | int cpu; | 348 | int cpu; |
349 | 349 | ||
350 | for_each_online_cpu(cpu) { | 350 | for_each_online_cpu(cpu) { |
351 | spinlock_t *lock = &per_cpu(tstats_lookup_lock, cpu); | 351 | raw_spinlock_t *lock = &per_cpu(tstats_lookup_lock, cpu); |
352 | spin_lock_irqsave(lock, flags); | 352 | |
353 | raw_spin_lock_irqsave(lock, flags); | ||
353 | /* nothing */ | 354 | /* nothing */ |
354 | spin_unlock_irqrestore(lock, flags); | 355 | raw_spin_unlock_irqrestore(lock, flags); |
355 | } | 356 | } |
356 | } | 357 | } |
357 | 358 | ||
@@ -409,7 +410,7 @@ void __init init_timer_stats(void) | |||
409 | int cpu; | 410 | int cpu; |
410 | 411 | ||
411 | for_each_possible_cpu(cpu) | 412 | for_each_possible_cpu(cpu) |
412 | spin_lock_init(&per_cpu(tstats_lookup_lock, cpu)); | 413 | raw_spin_lock_init(&per_cpu(tstats_lookup_lock, cpu)); |
413 | } | 414 | } |
414 | 415 | ||
415 | static int __init init_tstats_procfs(void) | 416 | static int __init init_tstats_procfs(void) |