Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60521
b: refs/heads/master
c: 791cc50
h: refs/heads/master
i:
  60519: add8f65
v: v3
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Jun 14, 2007
1 parent fc0afa2 commit 715f2de
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6d110da8c3c62167c54eb5e32bb80916a1a23362
refs/heads/master: 791cc501d422be96d6e3098faf6471ba29f4dd33
14 changes: 7 additions & 7 deletions trunk/arch/powerpc/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,22 +219,26 @@ void discard_lazy_cpu_state(void)
}
#endif /* CONFIG_SMP */

#ifdef CONFIG_PPC_MERGE /* XXX for now */
int set_dabr(unsigned long dabr)
{
#ifdef CONFIG_PPC_MERGE /* XXX for now */
if (ppc_md.set_dabr)
return ppc_md.set_dabr(dabr);
#endif

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

#ifdef CONFIG_PPC64
DEFINE_PER_CPU(struct cpu_usage, cpu_usage_array);
static DEFINE_PER_CPU(unsigned long, current_dabr);
#endif

static DEFINE_PER_CPU(unsigned long, current_dabr);

struct task_struct *__switch_to(struct task_struct *prev,
struct task_struct *new)
{
Expand Down Expand Up @@ -299,12 +303,10 @@ struct task_struct *__switch_to(struct task_struct *prev,

#endif /* CONFIG_SMP */

#ifdef CONFIG_PPC64 /* for now */
if (unlikely(__get_cpu_var(current_dabr) != new->thread.dabr)) {
set_dabr(new->thread.dabr);
__get_cpu_var(current_dabr) = new->thread.dabr;
}
#endif /* CONFIG_PPC64 */

new_thread = &new->thread;
old_thread = &current->thread;
Expand Down Expand Up @@ -473,12 +475,10 @@ void flush_thread(void)

discard_lazy_cpu_state();

#ifdef CONFIG_PPC64 /* for now */
if (current->thread.dabr) {
current->thread.dabr = 0;
set_dabr(0);
}
#endif
}

void
Expand Down

0 comments on commit 715f2de

Please sign in to comment.