]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - arch/powerpc/include/asm/livepatch.h
powerpc/livepatch: Add livepatch stack to struct thread_info
[mirror_ubuntu-zesty-kernel.git] / arch / powerpc / include / asm / livepatch.h
index ad36e8e34fa135632d5e71452826b49e4308f1aa..a402f7f948965f1f28d4c3f2385001c1ecdef2b6 100644 (file)
@@ -49,6 +49,14 @@ static inline unsigned long klp_get_ftrace_location(unsigned long faddr)
         */
        return ftrace_location_range(faddr, faddr + 16);
 }
+
+static inline void klp_init_thread_info(struct thread_info *ti)
+{
+       /* + 1 to account for STACK_END_MAGIC */
+       ti->livepatch_sp = (unsigned long *)(ti + 1) + 1;
+}
+#else
+static void klp_init_thread_info(struct thread_info *ti) { }
 #endif /* CONFIG_LIVEPATCH */
 
 #endif /* _ASM_POWERPC_LIVEPATCH_H */