powerpc/pseries: Fix to handle slb resize across migration
The SLB can change sizes across a live migration, which was not being handled, resulting in possible machine crashes during migration if migrating to a machine which has a smaller max SLB size than the source machine. Fix this by first reducing the SLB size to the minimum possible value, which is 32, prior to migration. Then during the device tree update which occurs after migration, we make the call to ensure the SLB gets updated. Also add the slb_size to the lparcfg output so that the migration tools can check to make sure the kernel has this capability before allowing migration in scenarios where the SLB size will change. BenH: Fixed #include <asm/mmu-hash64.h> -> <asm/mmu.h> to avoid breaking ppc32 build Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
committed by
Benjamin Herrenschmidt
parent
b8e4a7dae5
commit
46db2f86a3
@@ -39,6 +39,7 @@
|
||||
#include <asm/smp.h>
|
||||
#include <asm/atomic.h>
|
||||
#include <asm/time.h>
|
||||
#include <asm/mmu.h>
|
||||
|
||||
struct rtas_t rtas = {
|
||||
.lock = __RAW_SPIN_LOCK_UNLOCKED
|
||||
@@ -713,6 +714,7 @@ static void rtas_percpu_suspend_me(void *info)
|
||||
{
|
||||
long rc = H_SUCCESS;
|
||||
unsigned long msr_save;
|
||||
u16 slb_size = mmu_slb_size;
|
||||
int cpu;
|
||||
struct rtas_suspend_me_data *data =
|
||||
(struct rtas_suspend_me_data *)info;
|
||||
@@ -735,13 +737,16 @@ static void rtas_percpu_suspend_me(void *info)
|
||||
/* All other cpus are in H_JOIN, this cpu does
|
||||
* the suspend.
|
||||
*/
|
||||
slb_set_size(SLB_MIN_SIZE);
|
||||
printk(KERN_DEBUG "calling ibm,suspend-me on cpu %i\n",
|
||||
smp_processor_id());
|
||||
data->error = rtas_call(data->token, 0, 1, NULL);
|
||||
|
||||
if (data->error)
|
||||
if (data->error) {
|
||||
printk(KERN_DEBUG "ibm,suspend-me returned %d\n",
|
||||
data->error);
|
||||
slb_set_size(slb_size);
|
||||
}
|
||||
} else {
|
||||
printk(KERN_ERR "H_JOIN on cpu %i failed with rc = %ld\n",
|
||||
smp_processor_id(), rc);
|
||||
|
Reference in New Issue
Block a user