]> git.karo-electronics.de Git - linux-beck.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)
commitb970b41ea68ace17f389c8387c1df4a86aa039a0
tree9e999c56f825bd1971131679b9ce06d10b2106a6
parentbe34d300597a7a4fb38c6e3f9929af2f1faa23b8
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