1 #include <linux/kernel.h>
2 #include <linux/version.h>
5 #include <asm/paravirt.h>
6 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
7 /* 98de032b681d8a7532d44dfc66aa5c0c1c755a9d was after 2.6.21 */
8 #define paravirt_patch_site paravirt_patch
9 #endif /* LINUX_VERSION_CODE */
10 #endif /* CONFIG_PARAVIRT */
12 #include <asm/uaccess.h>
15 const struct table_section table_sections
[]
16 __attribute__((section(".ksplice_table_sections"))) = {
19 .sect
= ".altinstructions",
20 .entry_size
= sizeof(struct alt_instr
),
21 .entry_align
= __alignof__(struct alt_instr
),
22 .addr_offset
= offsetof(struct alt_instr
, instr
),
23 .other_sect
= ".altinstr_replacement",
24 .other_offset
= offsetof(struct alt_instr
, replacement
),
26 #endif /* CONFIG_X86 */
29 .entry_size
= sizeof(struct exception_table_entry
),
30 .entry_align
= __alignof__(struct exception_table_entry
),
31 .addr_offset
= offsetof(struct exception_table_entry
, insn
),
32 .other_sect
= ".fixup",
33 .other_offset
= offsetof(struct exception_table_entry
, fixup
),
35 #ifdef CONFIG_PARAVIRT
37 .sect
= ".parainstructions",
38 .entry_size
= sizeof(struct paravirt_patch_site
),
39 .entry_align
= __alignof__(struct paravirt_patch_site
),
40 .addr_offset
= offsetof(struct paravirt_patch_site
, instr
),
42 #endif /* CONFIG_PARAVIRT */
45 .entry_size
= sizeof(u8
*),
46 .entry_align
= __alignof__(u8
*),