Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * livepatch.h - powerpc-specific Kernel Live Patching Core
0004  *
0005  * Copyright (C) 2015-2016, SUSE, IBM Corp.
0006  */
0007 #ifndef _ASM_POWERPC_LIVEPATCH_H
0008 #define _ASM_POWERPC_LIVEPATCH_H
0009 
0010 #include <linux/sched.h>
0011 #include <linux/sched/task_stack.h>
0012 
0013 #ifdef CONFIG_LIVEPATCH_64
0014 static inline void klp_init_thread_info(struct task_struct *p)
0015 {
0016     /* + 1 to account for STACK_END_MAGIC */
0017     task_thread_info(p)->livepatch_sp = end_of_stack(p) + 1;
0018 }
0019 #else
0020 static inline void klp_init_thread_info(struct task_struct *p) { }
0021 #endif
0022 
0023 #endif /* _ASM_POWERPC_LIVEPATCH_H */