162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#ifndef _ASM_IA64_PATCH_H
362306a36Sopenharmony_ci#define _ASM_IA64_PATCH_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci/*
662306a36Sopenharmony_ci * Copyright (C) 2003 Hewlett-Packard Co
762306a36Sopenharmony_ci *	David Mosberger-Tang <davidm@hpl.hp.com>
862306a36Sopenharmony_ci *
962306a36Sopenharmony_ci * There are a number of reasons for patching instructions.  Rather than duplicating code
1062306a36Sopenharmony_ci * all over the place, we put the common stuff here.  Reasons for patching: in-kernel
1162306a36Sopenharmony_ci * module-loader, virtual-to-physical patch-list, McKinley Errata 9 workaround, and gate
1262306a36Sopenharmony_ci * shared library.  Undoubtedly, some of these reasons will disappear and others will
1362306a36Sopenharmony_ci * be added over time.
1462306a36Sopenharmony_ci */
1562306a36Sopenharmony_ci#include <linux/elf.h>
1662306a36Sopenharmony_ci#include <linux/types.h>
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ciextern void ia64_patch (u64 insn_addr, u64 mask, u64 val);	/* patch any insn slot */
1962306a36Sopenharmony_ciextern void ia64_patch_imm64 (u64 insn_addr, u64 val);		/* patch "movl" w/abs. value*/
2062306a36Sopenharmony_ciextern void ia64_patch_imm60 (u64 insn_addr, u64 val);		/* patch "brl" w/ip-rel value */
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ciextern void ia64_patch_mckinley_e9 (unsigned long start, unsigned long end);
2362306a36Sopenharmony_ciextern void ia64_patch_vtop (unsigned long start, unsigned long end);
2462306a36Sopenharmony_ciextern void ia64_patch_phys_stack_reg(unsigned long val);
2562306a36Sopenharmony_ciextern void ia64_patch_rse (unsigned long start, unsigned long end);
2662306a36Sopenharmony_ciextern void ia64_patch_gate (void);
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci#endif /* _ASM_IA64_PATCH_H */
29