This patchset allows for setup_rfi_flush() to be called again after PowerVM LPM (live partition mobility) aka LPAR migration, in order to possibly switch to a different flush method.
The patches are mostly from Michael Ellerman, I have rebased to powerpc/linux.git merge branch as of commit 249d7ba (March 12th), and added one extra commit to force init of fallback flush area on pseries. Testing: ------- I've disabled most code in the LPM functions migration_store() and post_mobility_fixup() to just reach pseries_setup_rfi_flush(), and modified pseries_setup_rfi_flush() a few times to fake the first and non-first calls to either enable instructions or the fallback flush method, to cover all 4 possible scenarios. Case 1) fallback -> fallback # dmesg | grep rfi-flush [ 0.000000] rfi-flush: Using fallback displacement flush [ 0.000000] rfi-flush: patched 8 locations # echo > /sys/kernel/mobility/migration # dmesg | grep rfi-flush [ 0.000000] rfi-flush: Using fallback displacement flush [ 0.000000] rfi-flush: patched 8 locations [ 20.583029] rfi-flush: Using fallback displacement flush [ 20.583038] rfi-flush: patched 8 locations Case 2) instructions -> fallback # dmesg | grep rfi-flush [ 0.000000] rfi-flush: Using ori type flush [ 0.000000] rfi-flush: Using mttrig type flush [ 0.000000] rfi-flush: patched 8 locations # echo > /sys/kernel/mobility/migration # dmesg | grep rfi-flush [ 0.000000] rfi-flush: Using ori type flush [ 0.000000] rfi-flush: Using mttrig type flush [ 0.000000] rfi-flush: patched 8 locations [ 36.023759] rfi-flush: Using fallback displacement flush [ 36.023764] rfi-flush: patched 8 locations Case 3) fallback -> instructions # dmesg | grep rfi-flush [ 0.000000] rfi-flush: Using fallback displacement flush [ 0.000000] rfi-flush: patched 8 locations # echo > /sys/kernel/mobility/migration # dmesg | grep rfi-flush [ 0.000000] rfi-flush: Using fallback displacement flush [ 0.000000] rfi-flush: patched 8 locations [ 23.373037] rfi-flush: Using ori type flush [ 23.373039] rfi-flush: Using mttrig type flush [ 23.373044] rfi-flush: patched 8 locations Case 4) instructions -> instructions # dmesg | grep rfi-flush [ 0.000000] rfi-flush: Using ori type flush [ 0.000000] rfi-flush: Using mttrig type flush [ 0.000000] rfi-flush: patched 8 locations # echo > /sys/kernel/mobility/migration # dmesg | grep rfi-flush [ 0.000000] rfi-flush: Using ori type flush [ 0.000000] rfi-flush: Using mttrig type flush [ 0.000000] rfi-flush: patched 8 locations [ 23.243564] rfi-flush: Using ori type flush [ 23.243566] rfi-flush: Using mttrig type flush [ 23.243570] rfi-flush: patched 8 locations Mauricio Faria de Oliveira (1): rfi-flush: Allow pseries to force init of fallback flush area Michael Ellerman (3): rfi-flush: Move the logic to avoid a redo into the debugfs code rfi-flush: Make it possible to call setup_rfi_flush() again rfi-flush: Call setup_rfi_flush() after LPM migration arch/powerpc/include/asm/setup.h | 2 +- arch/powerpc/kernel/setup_64.c | 22 +++++++++++++++------- arch/powerpc/platforms/powernv/setup.c | 3 ++- arch/powerpc/platforms/pseries/mobility.c | 3 +++ arch/powerpc/platforms/pseries/pseries.h | 2 ++ arch/powerpc/platforms/pseries/setup.c | 6 +++--- 6 files changed, 26 insertions(+), 12 deletions(-) -- 2.7.4