diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2016-04-18 20:45:32 +1000 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-04-18 20:45:32 +1000 |
commit | 8404410b296095c78ed63f163ac5d417ff0647dd (patch) | |
tree | 542fcea7d106a8fd608c47da1a8c88255f3e2c5f /arch/powerpc/kernel/process.c | |
parent | 1050e689a63baffdadcd33498c15d859922504c0 (diff) | |
parent | 85baa095497f3e590df9f6c8932121f123efca5c (diff) |
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.c | 6 |
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 */ |