diff options
Diffstat (limited to 'kernel/hrtimer.c')
| -rw-r--r-- | kernel/hrtimer.c | 22 | 
1 files changed, 10 insertions, 12 deletions
| diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 98bee013f71f..c642ef75069f 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c | |||
| @@ -1354,13 +1354,13 @@ long __sched hrtimer_nanosleep_restart(struct restart_block *restart) | |||
| 1354 | struct hrtimer_sleeper t; | 1354 | struct hrtimer_sleeper t; | 
| 1355 | struct timespec __user *rmtp; | 1355 | struct timespec __user *rmtp; | 
| 1356 | 1356 | ||
| 1357 | hrtimer_init(&t.timer, restart->arg0, HRTIMER_MODE_ABS); | 1357 | hrtimer_init(&t.timer, restart->nanosleep.index, HRTIMER_MODE_ABS); | 
| 1358 | t.timer.expires.tv64 = ((u64)restart->arg3 << 32) | (u64) restart->arg2; | 1358 | t.timer.expires.tv64 = restart->nanosleep.expires; | 
| 1359 | 1359 | ||
| 1360 | if (do_nanosleep(&t, HRTIMER_MODE_ABS)) | 1360 | if (do_nanosleep(&t, HRTIMER_MODE_ABS)) | 
| 1361 | return 0; | 1361 | return 0; | 
| 1362 | 1362 | ||
| 1363 | rmtp = (struct timespec __user *)restart->arg1; | 1363 | rmtp = restart->nanosleep.rmtp; | 
| 1364 | if (rmtp) { | 1364 | if (rmtp) { | 
| 1365 | int ret = update_rmtp(&t.timer, rmtp); | 1365 | int ret = update_rmtp(&t.timer, rmtp); | 
| 1366 | if (ret <= 0) | 1366 | if (ret <= 0) | 
| @@ -1394,10 +1394,9 @@ long hrtimer_nanosleep(struct timespec *rqtp, struct timespec __user *rmtp, | |||
| 1394 | 1394 | ||
| 1395 | restart = ¤t_thread_info()->restart_block; | 1395 | restart = ¤t_thread_info()->restart_block; | 
| 1396 | restart->fn = hrtimer_nanosleep_restart; | 1396 | restart->fn = hrtimer_nanosleep_restart; | 
| 1397 | restart->arg0 = (unsigned long) t.timer.base->index; | 1397 | restart->nanosleep.index = t.timer.base->index; | 
| 1398 | restart->arg1 = (unsigned long) rmtp; | 1398 | restart->nanosleep.rmtp = rmtp; | 
| 1399 | restart->arg2 = t.timer.expires.tv64 & 0xFFFFFFFF; | 1399 | restart->nanosleep.expires = t.timer.expires.tv64; | 
| 1400 | restart->arg3 = t.timer.expires.tv64 >> 32; | ||
| 1401 | 1400 | ||
| 1402 | return -ERESTART_RESTARTBLOCK; | 1401 | return -ERESTART_RESTARTBLOCK; | 
| 1403 | } | 1402 | } | 
| @@ -1425,7 +1424,6 @@ static void __cpuinit init_hrtimers_cpu(int cpu) | |||
| 1425 | int i; | 1424 | int i; | 
| 1426 | 1425 | ||
| 1427 | spin_lock_init(&cpu_base->lock); | 1426 | spin_lock_init(&cpu_base->lock); | 
| 1428 | lockdep_set_class(&cpu_base->lock, &cpu_base->lock_key); | ||
| 1429 | 1427 | ||
| 1430 | for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) | 1428 | for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) | 
| 1431 | cpu_base->clock_base[i].cpu_base = cpu_base; | 1429 | cpu_base->clock_base[i].cpu_base = cpu_base; | 
| @@ -1466,16 +1464,16 @@ static void migrate_hrtimers(int cpu) | |||
| 1466 | tick_cancel_sched_timer(cpu); | 1464 | tick_cancel_sched_timer(cpu); | 
| 1467 | 1465 | ||
| 1468 | local_irq_disable(); | 1466 | local_irq_disable(); | 
| 1469 | double_spin_lock(&new_base->lock, &old_base->lock, | 1467 | spin_lock(&new_base->lock); | 
| 1470 | smp_processor_id() < cpu); | 1468 | spin_lock_nested(&old_base->lock, SINGLE_DEPTH_NESTING); | 
| 1471 | 1469 | ||
| 1472 | for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) { | 1470 | for (i = 0; i < HRTIMER_MAX_CLOCK_BASES; i++) { | 
| 1473 | migrate_hrtimer_list(&old_base->clock_base[i], | 1471 | migrate_hrtimer_list(&old_base->clock_base[i], | 
| 1474 | &new_base->clock_base[i]); | 1472 | &new_base->clock_base[i]); | 
| 1475 | } | 1473 | } | 
| 1476 | 1474 | ||
| 1477 | double_spin_unlock(&new_base->lock, &old_base->lock, | 1475 | spin_unlock(&old_base->lock); | 
| 1478 | smp_processor_id() < cpu); | 1476 | spin_unlock(&new_base->lock); | 
| 1479 | local_irq_enable(); | 1477 | local_irq_enable(); | 
| 1480 | put_cpu_var(hrtimer_bases); | 1478 | put_cpu_var(hrtimer_bases); | 
| 1481 | } | 1479 | } | 
