From: Michael Neuling <hidden> Date: 2008-01-10 06:49:03
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
offlined the CPU.
This patch 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 <redacted>
---
paulus: This, or some variant of it, is probably 2.6.24 material.
arch/powerpc/mm/slb.c | 2 +-
arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 ++
arch/powerpc/platforms/pseries/lpar.c | 6 ++++++
3 files changed, 9 insertions(+), 1 deletion(-)
Index: linux-2.6-ozlabs/arch/powerpc/mm/slb.c
===================================================================
@@ -29,6 +29,7 @@#include<asm/vdso_datapage.h>#include<asm/pSeries_reconfig.h>#include"xics.h"+#include"plpar_wrappers.h"/* This version can't take the spinlock, because it never returns */staticstructrtas_argsrtas_stop_self_args={
@@ -58,6 +59,7 @@ static void pseries_mach_cpu_die(void)local_irq_disable();idle_task_exit();xics_teardown_cpu(0);+unregister_slb_shadow(smp_processor_id(),__pa(get_slb_shadow()));rtas_stop_self();/* Should never get here... */BUG();
From: Michael Neuling <hidden> Date: 2008-01-10 07:11:54
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
offlined the CPU.
This patch 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 <redacted>
---
Updates for comments by mpe.
Also, thanks to Anton for helping find this problem.
arch/powerpc/mm/slb.c | 2 +-
arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 ++
arch/powerpc/platforms/pseries/lpar.c | 3 +++
include/asm-powerpc/mmu-hash64.h | 1 +
4 files changed, 7 insertions(+), 1 deletion(-)
Index: linux-2.6-ozlabs/arch/powerpc/mm/slb.c
===================================================================
@@ -29,6 +29,7 @@#include<asm/vdso_datapage.h>#include<asm/pSeries_reconfig.h>#include"xics.h"+#include"plpar_wrappers.h"/* This version can't take the spinlock, because it never returns */staticstructrtas_argsrtas_stop_self_args={
@@ -58,6 +59,7 @@ static void pseries_mach_cpu_die(void)local_irq_disable();idle_task_exit();xics_teardown_cpu(0);+unregister_slb_shadow(smp_processor_id(),__pa(get_slb_shadow()));rtas_stop_self();/* Should never get here... */BUG();
From: Michael Neuling <hidden> Date: 2008-01-11 00:47:07
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
offlined the CPU.
This patch 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 <redacted>
---
Updates for offline comments from paulus
arch/powerpc/mm/slb.c | 8 ++++++++
arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 ++
arch/powerpc/platforms/pseries/lpar.c | 1 +
include/asm-powerpc/mmu-hash64.h | 1 +
4 files changed, 12 insertions(+)
Index: linux-2.6-ozlabs/arch/powerpc/mm/slb.c
===================================================================
@@ -29,6 +29,7 @@#include<asm/vdso_datapage.h>#include<asm/pSeries_reconfig.h>#include"xics.h"+#include"plpar_wrappers.h"/* This version can't take the spinlock, because it never returns */staticstructrtas_argsrtas_stop_self_args={
@@ -58,6 +59,7 @@ static void pseries_mach_cpu_die(void)local_irq_disable();idle_task_exit();xics_teardown_cpu(0);+unregister_slb_shadow(smp_processor_id(),__pa(get_slb_shadow()));rtas_stop_self();/* Should never get here... */BUG();
From: Michael Neuling <hidden> Date: 2008-01-11 03:02:47
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
offlined the CPU.
This patch 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 <redacted>
---
Updated based on comment from ntl
arch/powerpc/mm/slb.c | 8 ++++++++
arch/powerpc/platforms/pseries/hotplug-cpu.c | 2 ++
arch/powerpc/platforms/pseries/lpar.c | 1 +
include/asm-powerpc/mmu-hash64.h | 1 +
4 files changed, 12 insertions(+)
Index: linux-2.6-ozlabs/arch/powerpc/mm/slb.c
===================================================================
@@ -29,6 +29,7 @@#include<asm/vdso_datapage.h>#include<asm/pSeries_reconfig.h>#include"xics.h"+#include"plpar_wrappers.h"/* This version can't take the spinlock, because it never returns */staticstructrtas_argsrtas_stop_self_args={
@@ -58,6 +59,7 @@ static void pseries_mach_cpu_die(void)local_irq_disable();idle_task_exit();xics_teardown_cpu(0);+unregister_slb_shadow(hard_smp_processor_id(),__pa(get_slb_shadow()));rtas_stop_self();/* Should never get here... */BUG();