aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/process.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2016-04-18 20:45:32 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2016-04-18 20:45:32 +1000
commit8404410b296095c78ed63f163ac5d417ff0647dd (patch)
tree542fcea7d106a8fd608c47da1a8c88255f3e2c5f /arch/powerpc/kernel/process.c
parentcxl: Delete an unnecessary check before the function call "kfree" (diff)
parentpowerpc/livepatch: Add live patching support on ppc64le (diff)
downloadlinux-dev-8404410b296095c78ed63f163ac5d417ff0647dd.tar.xz
linux-dev-8404410b296095c78ed63f163ac5d417ff0647dd.zip
Merge branch 'topic/livepatch' into next
Merge the support for live patching on ppc64le using mprofile-kernel. This branch has also been merged into the livepatching tree for v4.7.
Diffstat (limited to 'arch/powerpc/kernel/process.c')
-rw-r--r--arch/powerpc/kernel/process.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 4695088e7dd2..ad79816f13fe 100644
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -57,6 +57,8 @@
#endif
#include <asm/code-patching.h>
#include <asm/exec.h>
+#include <asm/livepatch.h>
+
#include <linux/kprobes.h>
#include <linux/kdebug.h>
@@ -1402,13 +1404,15 @@ int copy_thread(unsigned long clone_flags, unsigned long usp,
extern void ret_from_kernel_thread(void);
void (*f)(void);
unsigned long sp = (unsigned long)task_stack_page(p) + THREAD_SIZE;
+ struct thread_info *ti = task_thread_info(p);
+
+ klp_init_thread_info(ti);
/* Copy registers */
sp -= sizeof(struct pt_regs);
childregs = (struct pt_regs *) sp;
if (unlikely(p->flags & PF_KTHREAD)) {
/* kernel thread */
- struct thread_info *ti = (void *)task_stack_page(p);
memset(childregs, 0, sizeof(struct pt_regs));
childregs->gpr[1] = sp + sizeof(struct pt_regs);
/* function */