livepatch.h (604B)
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 10#include <linux/sched.h> 11#include <linux/sched/task_stack.h> 12 13#ifdef CONFIG_LIVEPATCH_64 14static inline void klp_init_thread_info(struct task_struct *p) 15{ 16 /* + 1 to account for STACK_END_MAGIC */ 17 task_thread_info(p)->livepatch_sp = end_of_stack(p) + 1; 18} 19#else 20static inline void klp_init_thread_info(struct task_struct *p) { } 21#endif 22 23#endif /* _ASM_POWERPC_LIVEPATCH_H */