diff options
Diffstat (limited to 'kernel/time')
| -rw-r--r-- | kernel/time/tick-common.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index bf43284d6855..80c4336f4188 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c | |||
| @@ -196,12 +196,10 @@ static int tick_check_new_device(struct clock_event_device *newdev) | |||
| 196 | struct tick_device *td; | 196 | struct tick_device *td; |
| 197 | int cpu, ret = NOTIFY_OK; | 197 | int cpu, ret = NOTIFY_OK; |
| 198 | unsigned long flags; | 198 | unsigned long flags; |
| 199 | cpumask_of_cpu_ptr_declare(cpumask); | ||
| 200 | 199 | ||
| 201 | spin_lock_irqsave(&tick_device_lock, flags); | 200 | spin_lock_irqsave(&tick_device_lock, flags); |
| 202 | 201 | ||
| 203 | cpu = smp_processor_id(); | 202 | cpu = smp_processor_id(); |
| 204 | cpumask_of_cpu_ptr_next(cpumask, cpu); | ||
| 205 | if (!cpu_isset(cpu, newdev->cpumask)) | 203 | if (!cpu_isset(cpu, newdev->cpumask)) |
| 206 | goto out_bc; | 204 | goto out_bc; |
| 207 | 205 | ||
| @@ -209,7 +207,7 @@ static int tick_check_new_device(struct clock_event_device *newdev) | |||
| 209 | curdev = td->evtdev; | 207 | curdev = td->evtdev; |
| 210 | 208 | ||
| 211 | /* cpu local device ? */ | 209 | /* cpu local device ? */ |
| 212 | if (!cpus_equal(newdev->cpumask, *cpumask)) { | 210 | if (!cpus_equal(newdev->cpumask, cpumask_of_cpu(cpu))) { |
| 213 | 211 | ||
| 214 | /* | 212 | /* |
| 215 | * If the cpu affinity of the device interrupt can not | 213 | * If the cpu affinity of the device interrupt can not |
| @@ -222,7 +220,7 @@ static int tick_check_new_device(struct clock_event_device *newdev) | |||
| 222 | * If we have a cpu local device already, do not replace it | 220 | * If we have a cpu local device already, do not replace it |
| 223 | * by a non cpu local device | 221 | * by a non cpu local device |
| 224 | */ | 222 | */ |
| 225 | if (curdev && cpus_equal(curdev->cpumask, *cpumask)) | 223 | if (curdev && cpus_equal(curdev->cpumask, cpumask_of_cpu(cpu))) |
| 226 | goto out_bc; | 224 | goto out_bc; |
| 227 | } | 225 | } |
| 228 | 226 | ||
| @@ -254,7 +252,7 @@ static int tick_check_new_device(struct clock_event_device *newdev) | |||
| 254 | curdev = NULL; | 252 | curdev = NULL; |
| 255 | } | 253 | } |
| 256 | clockevents_exchange_device(curdev, newdev); | 254 | clockevents_exchange_device(curdev, newdev); |
| 257 | tick_setup_device(td, newdev, cpu, cpumask); | 255 | tick_setup_device(td, newdev, cpu, &cpumask_of_cpu(cpu)); |
| 258 | if (newdev->features & CLOCK_EVT_FEAT_ONESHOT) | 256 | if (newdev->features & CLOCK_EVT_FEAT_ONESHOT) |
| 259 | tick_oneshot_notify(); | 257 | tick_oneshot_notify(); |
| 260 | 258 | ||
