summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/module_64.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-07-23 21:10:23 +0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-23 21:10:23 +0400
commita4e0d9af403d099e751797f6cc69e4a8e2d78ef1 (patch)
tree6f4afdffe5dbaad7529be987b8c3259a07395031 /arch/x86/kernel/module_64.c
parentc60f2b5c1defb6b1345968e1c65c2008c221d57d (diff)
parentc010b2f76c3032e48097a6eef291d8593d5d79a6 (diff)
downloadlinux-a4e0d9af403d099e751797f6cc69e4a8e2d78ef1.tar.xz
Merge ../linux-2.6
Diffstat (limited to 'arch/x86/kernel/module_64.c')
-rw-r--r--arch/x86/kernel/module_64.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/arch/x86/kernel/module_64.c b/arch/x86/kernel/module_64.c
index a888e67f5874..0e867676b5a5 100644
--- a/arch/x86/kernel/module_64.c
+++ b/arch/x86/kernel/module_64.c
@@ -150,7 +150,8 @@ int module_finalize(const Elf_Ehdr *hdr,
const Elf_Shdr *sechdrs,
struct module *me)
{
- const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL;
+ const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL,
+ *para = NULL;
char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) {
@@ -160,6 +161,8 @@ int module_finalize(const Elf_Ehdr *hdr,
alt = s;
if (!strcmp(".smp_locks", secstrings + s->sh_name))
locks= s;
+ if (!strcmp(".parainstructions", secstrings + s->sh_name))
+ para = s;
}
if (alt) {
@@ -175,6 +178,11 @@ int module_finalize(const Elf_Ehdr *hdr,
tseg, tseg + text->sh_size);
}
+ if (para) {
+ void *pseg = (void *)para->sh_addr;
+ apply_paravirt(pseg, pseg + para->sh_size);
+ }
+
return module_bug_finalize(hdr, sechdrs, me);
}