1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 */ 2*4882a593Smuzhiyun #ifndef _ASM_IA64_PATCH_H 3*4882a593Smuzhiyun #define _ASM_IA64_PATCH_H 4*4882a593Smuzhiyun 5*4882a593Smuzhiyun /* 6*4882a593Smuzhiyun * Copyright (C) 2003 Hewlett-Packard Co 7*4882a593Smuzhiyun * David Mosberger-Tang <davidm@hpl.hp.com> 8*4882a593Smuzhiyun * 9*4882a593Smuzhiyun * There are a number of reasons for patching instructions. Rather than duplicating code 10*4882a593Smuzhiyun * all over the place, we put the common stuff here. Reasons for patching: in-kernel 11*4882a593Smuzhiyun * module-loader, virtual-to-physical patch-list, McKinley Errata 9 workaround, and gate 12*4882a593Smuzhiyun * shared library. Undoubtedly, some of these reasons will disappear and others will 13*4882a593Smuzhiyun * be added over time. 14*4882a593Smuzhiyun */ 15*4882a593Smuzhiyun #include <linux/elf.h> 16*4882a593Smuzhiyun #include <linux/types.h> 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun extern void ia64_patch (u64 insn_addr, u64 mask, u64 val); /* patch any insn slot */ 19*4882a593Smuzhiyun extern void ia64_patch_imm64 (u64 insn_addr, u64 val); /* patch "movl" w/abs. value*/ 20*4882a593Smuzhiyun extern void ia64_patch_imm60 (u64 insn_addr, u64 val); /* patch "brl" w/ip-rel value */ 21*4882a593Smuzhiyun 22*4882a593Smuzhiyun extern void ia64_patch_mckinley_e9 (unsigned long start, unsigned long end); 23*4882a593Smuzhiyun extern void ia64_patch_vtop (unsigned long start, unsigned long end); 24*4882a593Smuzhiyun extern void ia64_patch_phys_stack_reg(unsigned long val); 25*4882a593Smuzhiyun extern void ia64_patch_rse (unsigned long start, unsigned long end); 26*4882a593Smuzhiyun extern void ia64_patch_gate (void); 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun #endif /* _ASM_IA64_PATCH_H */ 29