aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/powerpc-kexec-fix-for-powerpc64.patch
blob: d979885a4462304943004cb096c585e9ae3f6d79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 85388aad8ca15fcc28f5d0989265217351bada19 Mon Sep 17 00:00:00 2001
From: Benjamin Walsh <benjamin.walsh@windriver.com>
Date: Mon, 9 Feb 2009 14:25:47 -0500
Subject: [PATCH] powerpc: kexec fix for powerpc64

slbia instruction invalidates the SLB, but there was a hang on the first
instruction that caused an SLB miss exception. Doing a full sync after
the slbia causes the SLB to be in a consistent state for the handling of
the SLB exception.

Signed-off by: Benjamin Walsh <benjamin.walsh@windriver.com>
---
 arch/powerpc/mm/book3s64/slb.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/powerpc/mm/book3s64/slb.c b/arch/powerpc/mm/book3s64/slb.c
index 515730e499fe..7a8b335003b6 100644
--- a/arch/powerpc/mm/book3s64/slb.c
+++ b/arch/powerpc/mm/book3s64/slb.c
@@ -331,6 +331,7 @@ void slb_initialize(void)
 	asm volatile("isync":::"memory");
 	asm volatile("slbmte  %0,%0"::"r" (0) : "memory");
 	asm volatile("isync; slbia; isync":::"memory");
+	mb();
 	create_shadowed_slbe(PAGE_OFFSET, mmu_kernel_ssize, lflags, LINEAR_INDEX);
 	create_shadowed_slbe(VMALLOC_START, mmu_kernel_ssize, vflags, VMALLOC_INDEX);
 
-- 
2.1.0