diff options
Diffstat (limited to 'kernel/time/tick-common.c')
-rw-r--r-- | kernel/time/tick-common.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 4f3886562b8c..80c4336f4188 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,7 +196,6 @@ 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; | ||
200 | 199 | ||
201 | spin_lock_irqsave(&tick_device_lock, flags); | 200 | spin_lock_irqsave(&tick_device_lock, flags); |
202 | 201 | ||
@@ -206,10 +205,9 @@ static int tick_check_new_device(struct clock_event_device *newdev) | |||
206 | 205 | ||
207 | td = &per_cpu(tick_cpu_device, cpu); | 206 | td = &per_cpu(tick_cpu_device, cpu); |
208 | curdev = td->evtdev; | 207 | curdev = td->evtdev; |
209 | cpumask = cpumask_of_cpu(cpu); | ||
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 | ||