From 473980a99316c0e788bca50996375a2815124ce1 Mon Sep 17 00:00:00 2001 From: Michael Neuling Date: Fri, 11 Jan 2008 14:02:47 +1100 Subject: [POWERPC] Fix CPU hotplug when using the SLB shadow buffer Before we register the SLB shadow buffer, we need to invalidate the entries in the buffer, otherwise we can end up stale entries from when we previously offlined the CPU. This does this invalidate as well as unregistering the buffer with PHYP before we offline the cpu. Tested and fixes crashes seen on 970MP (thanks to tonyb) and POWER5. Signed-off-by: Michael Neuling Signed-off-by: Paul Mackerras --- arch/powerpc/mm/slb.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'arch/powerpc/mm/slb.c') diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c index 27922dff8b9..a282bc212e8 100644 --- a/arch/powerpc/mm/slb.c +++ b/arch/powerpc/mm/slb.c @@ -82,6 +82,14 @@ 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) -- cgit v1.2.3