Skip to content

Commit

Permalink
powerpc/booke: Don't set DABR on 64-bit BookE, use DAC1 instead
Browse files Browse the repository at this point in the history
Also remove a duplicate setting of it in the context switch path
on BookE.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Benjamin Herrenschmidt committed Sep 11, 2009
1 parent e51ee31 commit c6c9eac
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -284,14 +284,13 @@ int set_dabr(unsigned long dabr)
return ppc_md.set_dabr(dabr);

/* XXX should we have a CPU_FTR_HAS_DABR ? */
#if defined(CONFIG_PPC64) || defined(CONFIG_6xx)
mtspr(SPRN_DABR, dabr);
#endif

#if defined(CONFIG_BOOKE)
mtspr(SPRN_DAC1, dabr);
#elif defined(CONFIG_PPC_BOOK3S)
mtspr(SPRN_DABR, dabr);
#endif


return 0;
}

Expand Down Expand Up @@ -372,15 +371,16 @@ struct task_struct *__switch_to(struct task_struct *prev,

#endif /* CONFIG_SMP */

if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr))
set_dabr(new->thread.dabr);

#if defined(CONFIG_BOOKE)
/* If new thread DAC (HW breakpoint) is the same then leave it */
if (new->thread.dabr)
set_dabr(new->thread.dabr);
#else
if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr))
set_dabr(new->thread.dabr);
#endif


new_thread = &new->thread;
old_thread = &current->thread;

Expand Down

0 comments on commit c6c9eac

Please sign in to comment.