summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2003-07-06 23:01:50 -0700
committerSteve French <cifs.adm@hostme.bitkeeper.com>2003-07-06 23:01:50 -0700
commit8a6879c603dc4ea40f89fb1bda8f2b5039e19396 (patch)
treec0d883a41eff495d708bba2b95b2839065e8ab90 /kernel
parentb993be7e4517f328fd6bd8bcea2f038c894a292e (diff)
[PATCH] switch_mm and enter_lazy_tlb: remove cpu arg
switch_mm and enter_lazy_tlb take a CPU arg, which is always smp_processor_id(). This is misleading, and pointless if they use per-cpu variables or other optimizations. gcc will eliminate redundant smp_processor_id() (in inline functions) anyway. This removes that arg from all the architectures.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c2
-rw-r--r--kernel/sched.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index c52fc310cb16..7792bb1268ff 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -443,7 +443,7 @@ static inline void __exit_mm(struct task_struct * tsk)
/* more a memory barrier than a real lock */
task_lock(tsk);
tsk->mm = NULL;
- enter_lazy_tlb(mm, current, smp_processor_id());
+ enter_lazy_tlb(mm, current);
task_unlock(tsk);
mmput(mm);
}
diff --git a/kernel/sched.c b/kernel/sched.c
index a4305315afda..556c5cdbb9c2 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -646,9 +646,9 @@ static inline task_t * context_switch(runqueue_t *rq, task_t *prev, task_t *next
if (unlikely(!mm)) {
next->active_mm = oldmm;
atomic_inc(&oldmm->mm_count);
- enter_lazy_tlb(oldmm, next, smp_processor_id());
+ enter_lazy_tlb(oldmm, next);
} else
- switch_mm(oldmm, mm, next, smp_processor_id());
+ switch_mm(oldmm, mm, next);
if (unlikely(!prev->mm)) {
prev->active_mm = NULL;
@@ -2528,7 +2528,7 @@ void __init sched_init(void)
* The boot idle thread does lazy MMU switching as well:
*/
atomic_inc(&init_mm.mm_count);
- enter_lazy_tlb(&init_mm, current, smp_processor_id());
+ enter_lazy_tlb(&init_mm, current);
}
#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP