1 /******************************************************************************
2 * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp>
3 * VA Linux Systems Japan K.K.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __ASM_PARAVIRT_PATCH_H
22 #define __ASM_PARAVIRT_PATCH_H
26 .section .paravirt_branches, "a"
28 #define PARAVIRT_PATCH_SITE_BR(type) \
31 br.cond.sptk.many 2f ; \
36 .xdata8 ".paravirt_branches", 1b, type
40 #include <linux/stringify.h>
41 #include <asm/intrinsics.h>
43 /* for binary patch */
44 struct paravirt_patch_site_bundle {
50 /* label means the beginning of new bundle */
51 #define paravirt_alt_bundle(instr, privop) \
55 "\t.pushsection .paravirt_bundles, \"a\"\n" \
57 "\t.xdata8 \".paravirt_bundles\", 998b, 999b, " \
58 __stringify(privop) "\n"
61 struct paravirt_patch_bundle_elem {
68 struct paravirt_patch_site_inst {
74 #define paravirt_alt_inst(instr, privop) \
78 "\t.pushsection .paravirt_insts, \"a\"\n" \
80 "\t.xdata8 \".paravirt_insts\", 998b, 999b, " \
81 __stringify(privop) "\n"
83 struct paravirt_patch_site_branch {
88 struct paravirt_patch_branch_target {
94 __paravirt_patch_apply_branch(
95 unsigned long tag, unsigned long type,
96 const struct paravirt_patch_branch_target *entries,
97 unsigned int nr_entries);
100 paravirt_patch_reloc_br(unsigned long tag, const void *target);
103 paravirt_patch_reloc_brl(unsigned long tag, const void *target);
106 #if defined(ASM_SUPPORTED) && defined(CONFIG_PARAVIRT)
108 ia64_native_patch_bundle(void *sbundle, void *ebundle, unsigned long type);
111 __paravirt_patch_apply_bundle(void *sbundle, void *ebundle, unsigned long type,
112 const struct paravirt_patch_bundle_elem *elems,
113 unsigned long nelems,
114 const struct paravirt_patch_bundle_elem **found);
117 paravirt_patch_apply_bundle(const struct paravirt_patch_site_bundle *start,
118 const struct paravirt_patch_site_bundle *end);
121 paravirt_patch_apply_inst(const struct paravirt_patch_site_inst *start,
122 const struct paravirt_patch_site_inst *end);
124 void paravirt_patch_apply(void);
126 #define paravirt_patch_apply_bundle(start, end) do { } while (0)
127 #define paravirt_patch_apply_inst(start, end) do { } while (0)
128 #define paravirt_patch_apply() do { } while (0)
131 #endif /* !__ASSEMBLEY__ */
133 #endif /* __ASM_PARAVIRT_PATCH_H */
138 * c-set-style: "linux"
141 * indent-tabs-mode: t