aboutsummaryrefslogtreecommitdiff
path: root/kernel/time/tick-common.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-07-28 15:13:42 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-28 15:13:42 -0700
commit63add2f2072e69c1eb7a5f6ca8f415122da889b9 (patch)
tree6948de01b65858ae484474d3cbf2c9d7f61b28ca /kernel/time/tick-common.c
parent3684a601e4273692b6c80b86e55c728aef675660 (diff)
parent9e3ee1c39c0cc71222f9980ccbf87fe072897eef (diff)
Merge branch 'cpus4096-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'cpus4096-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: cpu masks: optimize and clean up cpumask_of_cpu() cpumask: export cpumask_of_cpu_map cpumask: change cpumask_of_cpu_ptr to use new cpumask_of_cpu cpumask: put cpumask_of_cpu_map in the initdata section cpumask: make cpumask_of_cpu_map generic
Diffstat (limited to 'kernel/time/tick-common.c')
-rw-r--r--kernel/time/tick-common.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c
index bf43284d685..80c4336f418 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)
struct tick_device *td;
int cpu, ret = NOTIFY_OK;
unsigned long flags;
- cpumask_of_cpu_ptr_declare(cpumask);
spin_lock_irqsave(&tick_device_lock, flags);
cpu = smp_processor_id();
- cpumask_of_cpu_ptr_next(cpumask, cpu);
if (!cpu_isset(cpu, newdev->cpumask))
goto out_bc;
@@ -209,7 +207,7 @@ static int tick_check_new_device(struct clock_event_device *newdev)
curdev = td->evtdev;
/* cpu local device ? */
- if (!cpus_equal(newdev->cpumask, *cpumask)) {
+ if (!cpus_equal(newdev->cpumask, cpumask_of_cpu(cpu))) {
/*
* 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)
* If we have a cpu local device already, do not replace it
* by a non cpu local device
*/
- if (curdev && cpus_equal(curdev->cpumask, *cpumask))
+ if (curdev && cpus_equal(curdev->cpumask, cpumask_of_cpu(cpu)))
goto out_bc;
}
@@ -254,7 +252,7 @@ static int tick_check_new_device(struct clock_event_device *newdev)
curdev = NULL;
}
clockevents_exchange_device(curdev, newdev);
- tick_setup_device(td, newdev, cpu, cpumask);
+ tick_setup_device(td, newdev, cpu, &cpumask_of_cpu(cpu));
if (newdev->features & CLOCK_EVT_FEAT_ONESHOT)
tick_oneshot_notify();