Commit:     dfbe0d3b6be52596b5694b1bb75b19562e769021
Parent:     d262c32a4bcc3e5fda0325a64e53c25fe1e999d7
Author:     Paul Mackerras <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 15 17:29:33 2008 +1100
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Tue Jan 15 17:30:58 2008 +1100

    [POWERPC] Fix boot failure on POWER6
    Commit 473980a99316c0e788bca50996375a2815124ce1 added a call to clear
    the SLB shadow buffer before registering it.  Unfortunately this means
    that we clear out the entries that slb_initialize has previously set in
    there.  On POWER6, the hypervisor uses the SLB shadow buffer when doing
    partition switches, and that means that after the next partition switch,
    each non-boot CPU has no SLB entries to map the kernel text and data,
    which causes it to crash.
    This fixes it by reverting most of 473980a9 and instead clearing the
    3rd entry explicitly in slb_initialize.  This fixes the problem that
    473980a9 was trying to solve, but without breaking POWER6.
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
 arch/powerpc/mm/slb.c                 |   10 ++--------
 arch/powerpc/platforms/pseries/lpar.c |    1 -
 include/asm-powerpc/mmu-hash64.h      |    1 -
 3 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
index a282bc2..50d7372 100644
--- a/arch/powerpc/mm/slb.c
+++ b/arch/powerpc/mm/slb.c
@@ -82,14 +82,6 @@ static inline void slb_shadow_clear(unsigned long entry)
        get_slb_shadow()->save_area[entry].esid = 0;
-void slb_shadow_clear_all(void)
-       int i;
-       for (i = 0; i < SLB_NUM_BOLTED; i++)
-               slb_shadow_clear(i);
 static inline void create_shadowed_slbe(unsigned long ea, int ssize,
                                        unsigned long flags,
                                        unsigned long entry)
@@ -300,6 +292,8 @@ void slb_initialize(void)
        create_shadowed_slbe(VMALLOC_START, mmu_kernel_ssize, vflags, 1);
+       slb_shadow_clear(2);
        /* We don't bolt the stack for the time being - we're in boot,
         * so the stack is in the bolted segment.  By the time it goes
         * elsewhere, we'll call _switch() which will bolt in the new
diff --git a/arch/powerpc/platforms/pseries/lpar.c 
index 34317aa..9a455d4 100644
--- a/arch/powerpc/platforms/pseries/lpar.c
+++ b/arch/powerpc/platforms/pseries/lpar.c
@@ -272,7 +272,6 @@ void vpa_init(int cpu)
        addr = __pa(&slb_shadow[cpu]);
        if (firmware_has_feature(FW_FEATURE_SPLPAR)) {
-               slb_shadow_clear_all();
                ret = register_slb_shadow(hwcpu, addr);
                if (ret)
diff --git a/include/asm-powerpc/mmu-hash64.h b/include/asm-powerpc/mmu-hash64.h
index 951e248..82328de 100644
--- a/include/asm-powerpc/mmu-hash64.h
+++ b/include/asm-powerpc/mmu-hash64.h
@@ -286,7 +286,6 @@ extern void hpte_init_iSeries(void);
 extern void hpte_init_beat(void);
 extern void hpte_init_beat_v3(void);
-extern void slb_shadow_clear_all(void);
 extern void stabs_alloc(void);
 extern void slb_initialize(void);
 extern void slb_flush_and_rebolt(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

Reply via email to