summaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/module.c
diff options
context:
space:
mode:
authorDavid Daney <ddaney@caviumnetworks.com>2010-12-28 13:26:23 -0800
committerRalf Baechle <ralf@linux-mips.org>2011-01-18 19:30:24 +0100
commit94bb0c1ab293c298a8852e4f10c4215bad6daa9b (patch)
treee4e7dfa18bf2ffd832a97d7ab67863b1b363c6fe /arch/mips/kernel/module.c
parent8d662c8d34a05e8e47deaa9e22fe770dc557c2d3 (diff)
downloadlinux-94bb0c1ab293c298a8852e4f10c4215bad6daa9b.tar.bz2
MIPS: jump label: Add MIPS support.
In order not to be left behind, we add jump label support for MIPS. Tested on 64-bit big endian (Octeon), and 32-bit little endian (malta/qemu). Signed-off-by: David Daney <ddaney@caviumnetworks.com> To: linux-mips@linux-mips.org Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Jason Baron <jbaron@redhat.com> Patchwork: https://patchwork.linux-mips.org/patch/1923/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel/module.c')
-rw-r--r--arch/mips/kernel/module.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/mips/kernel/module.c b/arch/mips/kernel/module.c
index d87a72e9fac7..dd940b701963 100644
--- a/arch/mips/kernel/module.c
+++ b/arch/mips/kernel/module.c
@@ -30,6 +30,8 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/spinlock.h>
+#include <linux/jump_label.h>
+
#include <asm/pgtable.h> /* MODULE_START */
struct mips_hi16 {
@@ -382,6 +384,9 @@ int module_finalize(const Elf_Ehdr *hdr,
const Elf_Shdr *s;
char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
+ /* Make jump label nops. */
+ jump_label_apply_nops(me);
+
INIT_LIST_HEAD(&me->arch.dbe_list);
for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) {
if (strcmp("__dbe_table", secstrings + s->sh_name) != 0)