Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=791cc501d422be96d6e3098faf6471ba29f4dd33
Commit:     791cc501d422be96d6e3098faf6471ba29f4dd33
Parent:     6d110da8c3c62167c54eb5e32bb80916a1a23362
Author:     Benjamin Herrenschmidt <[EMAIL PROTECTED]>
AuthorDate: Mon Jun 4 15:15:48 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Thu Jun 14 22:29:57 2007 +1000

    [POWERPC] Always apply DABR changes on context switches
    
    This patch removes the #ifdef CONFIG_PPC64 around setting the DABR.
    
    The actual setting of the SPR inside of the set_dabr() function is dependent
    on CONFIG_PPC64 || CONFIG_6xx but you can always provide a ppc_md hook to
    override that.  We should improve support for different HW breakpoints
    facilities but this is a first step.
    
    Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/kernel/process.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 6e2f035..84f000a 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -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)
 {
@@ -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;
@@ -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
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to