diff options
Diffstat (limited to 'arch/x86/kernel/module_64.c')
-rw-r--r-- | arch/x86/kernel/module_64.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/x86/kernel/module_64.c b/arch/x86/kernel/module_64.c index a888e67f5874..6ba87830d4b1 100644 --- a/arch/x86/kernel/module_64.c +++ b/arch/x86/kernel/module_64.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/fs.h> | 22 | #include <linux/fs.h> |
23 | #include <linux/string.h> | 23 | #include <linux/string.h> |
24 | #include <linux/kernel.h> | 24 | #include <linux/kernel.h> |
25 | #include <linux/mm.h> | ||
25 | #include <linux/slab.h> | 26 | #include <linux/slab.h> |
26 | #include <linux/bug.h> | 27 | #include <linux/bug.h> |
27 | 28 | ||
@@ -150,7 +151,8 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
150 | const Elf_Shdr *sechdrs, | 151 | const Elf_Shdr *sechdrs, |
151 | struct module *me) | 152 | struct module *me) |
152 | { | 153 | { |
153 | const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL; | 154 | const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL, |
155 | *para = NULL; | ||
154 | char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; | 156 | char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; |
155 | 157 | ||
156 | for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { | 158 | for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { |
@@ -160,6 +162,8 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
160 | alt = s; | 162 | alt = s; |
161 | if (!strcmp(".smp_locks", secstrings + s->sh_name)) | 163 | if (!strcmp(".smp_locks", secstrings + s->sh_name)) |
162 | locks= s; | 164 | locks= s; |
165 | if (!strcmp(".parainstructions", secstrings + s->sh_name)) | ||
166 | para = s; | ||
163 | } | 167 | } |
164 | 168 | ||
165 | if (alt) { | 169 | if (alt) { |
@@ -175,6 +179,11 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
175 | tseg, tseg + text->sh_size); | 179 | tseg, tseg + text->sh_size); |
176 | } | 180 | } |
177 | 181 | ||
182 | if (para) { | ||
183 | void *pseg = (void *)para->sh_addr; | ||
184 | apply_paravirt(pseg, pseg + para->sh_size); | ||
185 | } | ||
186 | |||
178 | return module_bug_finalize(hdr, sechdrs, me); | 187 | return module_bug_finalize(hdr, sechdrs, me); |
179 | } | 188 | } |
180 | 189 | ||