livepatch.h 604 B

1234567891011121314151617181920212223
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * livepatch.h - powerpc-specific Kernel Live Patching Core
  4. *
  5. * Copyright (C) 2015-2016, SUSE, IBM Corp.
  6. */
  7. #ifndef _ASM_POWERPC_LIVEPATCH_H
  8. #define _ASM_POWERPC_LIVEPATCH_H
  9. #include <linux/sched.h>
  10. #include <linux/sched/task_stack.h>
  11. #ifdef CONFIG_LIVEPATCH_64
  12. static inline void klp_init_thread_info(struct task_struct *p)
  13. {
  14. /* + 1 to account for STACK_END_MAGIC */
  15. task_thread_info(p)->livepatch_sp = end_of_stack(p) + 1;
  16. }
  17. #else
  18. static inline void klp_init_thread_info(struct task_struct *p) { }
  19. #endif
  20. #endif /* _ASM_POWERPC_LIVEPATCH_H */