diff options
author | Paul Mackerras <paulus@samba.org> | 2008-04-14 07:11:02 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-04-14 07:11:02 -0400 |
commit | ac7c5353b189e10cf5dd27399f64f7b013abffc6 (patch) | |
tree | 8222d92b774c256d6ec4399c716d76b3f05ddc4b /arch/powerpc/kernel/process.c | |
parent | a8f75ea70c58546205fb7673be41455b9da5d9a7 (diff) | |
parent | 120dd64cacd4fb796bca0acba3665553f1d9ecaa (diff) |
Merge branch 'linux-2.6'
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r-- | arch/powerpc/kernel/process.c | 10 |
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) | |||
241 | } | 241 | } |
242 | #endif /* CONFIG_SMP */ | 242 | #endif /* CONFIG_SMP */ |
243 | 243 | ||
244 | static DEFINE_PER_CPU(unsigned long, current_dabr); | ||
245 | |||
244 | int set_dabr(unsigned long dabr) | 246 | int set_dabr(unsigned long dabr) |
245 | { | 247 | { |
248 | __get_cpu_var(current_dabr) = dabr; | ||
249 | |||
246 | #ifdef CONFIG_PPC_MERGE /* XXX for now */ | 250 | #ifdef CONFIG_PPC_MERGE /* XXX for now */ |
247 | if (ppc_md.set_dabr) | 251 | if (ppc_md.set_dabr) |
248 | return ppc_md.set_dabr(dabr); | 252 | return ppc_md.set_dabr(dabr); |
@@ -259,8 +263,6 @@ int set_dabr(unsigned long dabr) | |||
259 | DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array); | 263 | DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array); |
260 | #endif | 264 | #endif |
261 | 265 | ||
262 | static DEFINE_PER_CPU(unsigned long, current_dabr); | ||
263 | |||
264 | struct task_struct *__switch_to(struct task_struct *prev, | 266 | struct task_struct *__switch_to(struct task_struct *prev, |
265 | struct task_struct *new) | 267 | struct task_struct *new) |
266 | { | 268 | { |
@@ -325,10 +327,8 @@ struct task_struct *__switch_to(struct task_struct *prev, | |||
325 | 327 | ||
326 | #endif /* CONFIG_SMP */ | 328 | #endif /* CONFIG_SMP */ |
327 | 329 | ||
328 | if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) { | 330 | if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) |
329 | set_dabr(new->thread.dabr); | 331 | set_dabr(new->thread.dabr); |
330 | __get_cpu_var(current_dabr) = new->thread.dabr; | ||
331 | } | ||
332 | 332 | ||
333 | new_thread = &new->thread; | 333 | new_thread = &new->thread; |
334 | old_thread = ¤t->thread; | 334 | old_thread = ¤t->thread; |