diff options
author | Michael Ellerman <mpe@ellerman.id.au> | 2016-03-24 12:04:04 +0100 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-04-14 07:47:06 +0200 |
commit | 5d31a96e6c0187f2c5d7004e005fd094a1277e9e (patch) | |
tree | 5d2bf3efea21bedf6a0df86b66f4c420fd06190e /arch/powerpc/kernel/irq.c | |
parent | powerpc/livepatch: Add livepatch header (diff) | |
download | linux-5d31a96e6c0187f2c5d7004e005fd094a1277e9e.tar.xz linux-5d31a96e6c0187f2c5d7004e005fd094a1277e9e.zip |
powerpc/livepatch: Add livepatch stack to struct thread_info
In order to support live patching we need to maintain an alternate
stack of TOC & LR values. We use the base of the stack for this, and
store the "live patch stack pointer" in struct thread_info.
Unlike the other fields of thread_info, we can not statically initialise
that value, so it must be done at run time.
This patch just adds the code to support that, it is not enabled until
the next patch which actually adds live patch support.
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Acked-by: Balbir Singh <bsingharora@gmail.com>
Diffstat (limited to 'arch/powerpc/kernel/irq.c')
-rw-r--r-- | arch/powerpc/kernel/irq.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 290559df1e8b..3cb46a3b1de7 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c @@ -66,6 +66,7 @@ #include <asm/udbg.h> #include <asm/smp.h> #include <asm/debug.h> +#include <asm/livepatch.h> #ifdef CONFIG_PPC64 #include <asm/paca.h> @@ -607,10 +608,12 @@ void irq_ctx_init(void) memset((void *)softirq_ctx[i], 0, THREAD_SIZE); tp = softirq_ctx[i]; tp->cpu = i; + klp_init_thread_info(tp); memset((void *)hardirq_ctx[i], 0, THREAD_SIZE); tp = hardirq_ctx[i]; tp->cpu = i; + klp_init_thread_info(tp); } } |