aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/process.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-09-08 10:16:58 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-09-10 21:27:59 -0400
commitc6c9eacef09a94b5866b83556196440aca876702 (patch)
tree7b3f4c86d44cdcd6c2ae7dc4ebc886a7ce22a2cb /arch/powerpc/kernel/process.c
parente51ee31e8af22948dcc3b115978469b09c96c3fd (diff)
powerpc/booke: Don't set DABR on 64-bit BookE, use DAC1 instead
Also remove a duplicate setting of it in the context switch path on BookE. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r--arch/powerpc/kernel/process.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 678ff132e8b0..0a3216433051 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -284,14 +284,13 @@ int set_dabr(unsigned long dabr)
284 return ppc_md.set_dabr(dabr); 284 return ppc_md.set_dabr(dabr);
285 285
286 /* XXX should we have a CPU_FTR_HAS_DABR ? */ 286 /* XXX should we have a CPU_FTR_HAS_DABR ? */
287#if defined(CONFIG_PPC64) || defined(CONFIG_6xx)
288 mtspr(SPRN_DABR, dabr);
289#endif
290
291#if defined(CONFIG_BOOKE) 287#if defined(CONFIG_BOOKE)
292 mtspr(SPRN_DAC1, dabr); 288 mtspr(SPRN_DAC1, dabr);
289#elif defined(CONFIG_PPC_BOOK3S)
290 mtspr(SPRN_DABR, dabr);
293#endif 291#endif
294 292
293
295 return 0; 294 return 0;
296} 295}
297 296
@@ -372,15 +371,16 @@ struct task_struct *__switch_to(struct task_struct *prev,
372 371
373#endif /* CONFIG_SMP */ 372#endif /* CONFIG_SMP */
374 373
375 if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr))
376 set_dabr(new->thread.dabr);
377
378#if defined(CONFIG_BOOKE) 374#if defined(CONFIG_BOOKE)
379 /* If new thread DAC (HW breakpoint) is the same then leave it */ 375 /* If new thread DAC (HW breakpoint) is the same then leave it */
380 if (new->thread.dabr) 376 if (new->thread.dabr)
381 set_dabr(new->thread.dabr); 377 set_dabr(new->thread.dabr);
378#else
379 if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr))
380 set_dabr(new->thread.dabr);
382#endif 381#endif
383 382
383
384 new_thread = &new->thread; 384 new_thread = &new->thread;
385 old_thread = &current->thread; 385 old_thread = &current->thread;
386 386