]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64/kexec: Copy image with MMU off when possible
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 19 Aug 2016 08:52:38 +0000 (14:22 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 22 Sep 2016 21:54:18 +0000 (07:54 +1000)
commit68aa9415713c9ad2eacc352d7d34627bc3ac1c5a
tree9e999c56f825bd1971131679b9ce06d10b2106a6
parentace2da8fcb92e234aca09d1e5ab25f66e278add3
powerpc/64/kexec: Copy image with MMU off when possible

Currently we turn the MMU off after copying the image, and we make
sure there is no overlap between the hash table and the target pages
in that case.

That doesn't work for Radix however. In that case, the page tables
are scattered and we can't really enforce that the target of the
image isn't overlapping one of them.

So instead, let's turn the MMU off before copying the image in radix
mode. Thankfully, in radix mode, even under a hypervisor, we know we
don't have the same kind of RMA limitations that hash mode has.

While at it, also turn the MMU off early when using hash in non-LPAR
mode, that way we can get rid of the collision check completely.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Acked-by: Balbir Singh <bsingharora@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/machine_kexec_64.c
arch/powerpc/kernel/misc_64.S