xref: /OK3568_Linux_fs/kernel/arch/x86/include/asm/livepatch.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0-or-later */
2*4882a593Smuzhiyun /*
3*4882a593Smuzhiyun  * livepatch.h - x86-specific Kernel Live Patching Core
4*4882a593Smuzhiyun  *
5*4882a593Smuzhiyun  * Copyright (C) 2014 Seth Jennings <sjenning@redhat.com>
6*4882a593Smuzhiyun  * Copyright (C) 2014 SUSE
7*4882a593Smuzhiyun  */
8*4882a593Smuzhiyun 
9*4882a593Smuzhiyun #ifndef _ASM_X86_LIVEPATCH_H
10*4882a593Smuzhiyun #define _ASM_X86_LIVEPATCH_H
11*4882a593Smuzhiyun 
12*4882a593Smuzhiyun #include <asm/setup.h>
13*4882a593Smuzhiyun #include <linux/ftrace.h>
14*4882a593Smuzhiyun 
klp_arch_set_pc(struct pt_regs * regs,unsigned long ip)15*4882a593Smuzhiyun static inline void klp_arch_set_pc(struct pt_regs *regs, unsigned long ip)
16*4882a593Smuzhiyun {
17*4882a593Smuzhiyun 	regs->ip = ip;
18*4882a593Smuzhiyun }
19*4882a593Smuzhiyun 
20*4882a593Smuzhiyun #endif /* _ASM_X86_LIVEPATCH_H */
21