summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/powernv/opal-kmsg.c
diff options
context:
space:
mode:
authorHugh Dickins <hughd@google.com>2016-01-10 03:54:59 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2016-01-12 03:03:53 +0300
commit2f10f1a7884e97a68e52c4b6f7866e29cf3fe7e6 (patch)
treecd886883448dc68d534d3127b3c5074efd472254 /arch/powerpc/platforms/powernv/opal-kmsg.c
parent44734f23de2465c3c0d39e4a16df7735b23fd142 (diff)
downloadlinux-2f10f1a7884e97a68e52c4b6f7866e29cf3fe7e6.tar.xz
powerpc/mm: fix _PAGE_SWP_SOFT_DIRTY breaking swapoff
Swapoff after swapping hangs on the G5, when CONFIG_CHECKPOINT_RESTORE=y but CONFIG_MEM_SOFT_DIRTY is not set. That's because the non-zero _PAGE_SWP_SOFT_DIRTY bit, added by CONFIG_HAVE_ARCH_SOFT_DIRTY=y, is not discounted when CONFIG_MEM_SOFT_DIRTY is not set: so swap ptes cannot be recognized. (I suspect that the peculiar dependence of HAVE_ARCH_SOFT_DIRTY on CHECKPOINT_RESTORE in arch/powerpc/Kconfig comes from an incomplete attempt to solve this problem.) It's true that the relationship between CONFIG_HAVE_ARCH_SOFT_DIRTY and and CONFIG_MEM_SOFT_DIRTY is too confusing, and it's true that swapoff should be made more robust; but nevertheless, fix up the powerpc ifdefs as x86_64 and s390 (which met the same problem) have them, defining the bits as 0 if CONFIG_MEM_SOFT_DIRTY is not set. Fixes: 7207f43665b8 ("powerpc/mm: Add page soft dirty tracking") Signed-off-by: Hugh Dickins <hughd@google.com> Reviewed-by: Cyrill Gorcunov <gorcunov@openvz.org> Acked-by: Laurent Dufour <ldufour@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/powernv/opal-kmsg.c')
0 files changed, 0 insertions, 0 deletions