aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/process.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2008-04-14 21:11:02 +1000
committerPaul Mackerras <paulus@samba.org>2008-04-14 21:11:02 +1000
commitac7c5353b189e10cf5dd27399f64f7b013abffc6 (patch)
tree8222d92b774c256d6ec4399c716d76b3f05ddc4b /arch/powerpc/kernel/process.c
parent[POWERPC] Remove CONFIG_PCI_LEGACY from some configs (diff)
parentLinux 2.6.25-rc9 (diff)
downloadlinux-dev-ac7c5353b189e10cf5dd27399f64f7b013abffc6.tar.xz
linux-dev-ac7c5353b189e10cf5dd27399f64f7b013abffc6.zip
Merge branch 'linux-2.6'
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r--arch/powerpc/kernel/process.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 8d506d86e2df..a27910207c7e 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -241,8 +241,12 @@ void discard_lazy_cpu_state(void)
}
#endif /* CONFIG_SMP */
+static DEFINE_PER_CPU(unsigned long, current_dabr);
+
int set_dabr(unsigned long dabr)
{
+ __get_cpu_var(current_dabr) = dabr;
+
#ifdef CONFIG_PPC_MERGE /* XXX for now */
if (ppc_md.set_dabr)
return ppc_md.set_dabr(dabr);
@@ -259,8 +263,6 @@ int set_dabr(unsigned long dabr)
DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array);
#endif
-static DEFINE_PER_CPU(unsigned long, current_dabr);
-
struct task_struct *__switch_to(struct task_struct *prev,
struct task_struct *new)
{
@@ -325,10 +327,8 @@ struct task_struct *__switch_to(struct task_struct *prev,
#endif /* CONFIG_SMP */
- if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) {
+ if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr))
set_dabr(new->thread.dabr);
- __get_cpu_var(current_dabr) = new->thread.dabr;
- }
new_thread = &new->thread;
old_thread = &current->thread;