]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc: Don't use __put_user() in patch_instruction
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 4 Sep 2012 15:08:28 +0000 (15:08 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 5 Sep 2012 06:05:23 +0000 (16:05 +1000)
commit844592d57bfef1bed2f9fe7a84202f784e3dbd36
treeaedbdd51b2558d9badd12cb68e5ecc4ed5823474
parentd53a5f80f1b3259f717f3de39326562afa987948
powerpc: Don't use __put_user() in patch_instruction

patch_instruction() can be called very early on ppc32, when the kernel
isn't yet running at it's linked address. That can cause the !
is_kernel_addr() test in __put_user() to trip and call might_sleep()
which is very bad at that point during boot.

Use a lower level function instead for now, at least until we get to
rework ppc32 boot process to do the code patching later, like ppc64
does.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/lib/code-patching.c