diff options
Diffstat (limited to 'kernel/time/tick-common.c')
-rw-r--r-- | kernel/time/tick-common.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 4f3886562b8c..bf43284d6855 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c | |||
@@ -135,7 +135,7 @@ void tick_setup_periodic(struct clock_event_device *dev, int broadcast) | |||
135 | */ | 135 | */ |
136 | static void tick_setup_device(struct tick_device *td, | 136 | static void tick_setup_device(struct tick_device *td, |
137 | struct clock_event_device *newdev, int cpu, | 137 | struct clock_event_device *newdev, int cpu, |
138 | cpumask_t cpumask) | 138 | const cpumask_t *cpumask) |
139 | { | 139 | { |
140 | ktime_t next_event; | 140 | ktime_t next_event; |
141 | void (*handler)(struct clock_event_device *) = NULL; | 141 | void (*handler)(struct clock_event_device *) = NULL; |
@@ -169,8 +169,8 @@ static void tick_setup_device(struct tick_device *td, | |||
169 | * When the device is not per cpu, pin the interrupt to the | 169 | * When the device is not per cpu, pin the interrupt to the |
170 | * current cpu: | 170 | * current cpu: |
171 | */ | 171 | */ |
172 | if (!cpus_equal(newdev->cpumask, cpumask)) | 172 | if (!cpus_equal(newdev->cpumask, *cpumask)) |
173 | irq_set_affinity(newdev->irq, cpumask); | 173 | irq_set_affinity(newdev->irq, *cpumask); |
174 | 174 | ||
175 | /* | 175 | /* |
176 | * When global broadcasting is active, check if the current | 176 | * When global broadcasting is active, check if the current |
@@ -196,20 +196,20 @@ 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_t cpumask; | 199 | cpumask_of_cpu_ptr_declare(cpumask); |
200 | 200 | ||
201 | spin_lock_irqsave(&tick_device_lock, flags); | 201 | spin_lock_irqsave(&tick_device_lock, flags); |
202 | 202 | ||
203 | cpu = smp_processor_id(); | 203 | cpu = smp_processor_id(); |
204 | cpumask_of_cpu_ptr_next(cpumask, cpu); | ||
204 | if (!cpu_isset(cpu, newdev->cpumask)) | 205 | if (!cpu_isset(cpu, newdev->cpumask)) |
205 | goto out_bc; | 206 | goto out_bc; |
206 | 207 | ||
207 | td = &per_cpu(tick_cpu_device, cpu); | 208 | td = &per_cpu(tick_cpu_device, cpu); |
208 | curdev = td->evtdev; | 209 | curdev = td->evtdev; |
209 | cpumask = cpumask_of_cpu(cpu); | ||
210 | 210 | ||
211 | /* cpu local device ? */ | 211 | /* cpu local device ? */ |
212 | if (!cpus_equal(newdev->cpumask, cpumask)) { | 212 | if (!cpus_equal(newdev->cpumask, *cpumask)) { |
213 | 213 | ||
214 | /* | 214 | /* |
215 | * If the cpu affinity of the device interrupt can not | 215 | * If the cpu affinity of the device interrupt can not |
@@ -222,7 +222,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 | 222 | * If we have a cpu local device already, do not replace it |
223 | * by a non cpu local device | 223 | * by a non cpu local device |
224 | */ | 224 | */ |
225 | if (curdev && cpus_equal(curdev->cpumask, cpumask)) | 225 | if (curdev && cpus_equal(curdev->cpumask, *cpumask)) |
226 | goto out_bc; | 226 | goto out_bc; |
227 | } | 227 | } |
228 | 228 | ||