jump label: Add MIPS support.
Subsystems (2)
PATCH v3 1/1 jump label: Add MIPS support.
When in Rome...
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 <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Jason Baron <[email protected]>
---
Now that the core jump label support has been merged, this patch easily go via Ralf's tree.
The only changes from v2 are Makefile and Kconfig improvements.
arch/mips/Kconfig | 1 + arch/mips/include/asm/jump_label.h | 48 ++++++++++++++++++++++++++++++++++ arch/mips/kernel/Makefile | 2 + arch/mips/kernel/jump_label.c | 50 ++++++++++++++++++++++++++++++++++++ arch/mips/kernel/module.c | 5 +++ 5 files changed, 106 insertions(+), 0 deletions(-) create mode 100644 arch/mips/include/asm/jump_label.h create mode 100644 arch/mips/kernel/jump_label.c
arch/mips/Kconfig +1 -0
@@ -21,6 +21,7 @@ config MIPS select HAVE_DMA_API_DEBUG select HAVE_GENERIC_HARDIRQS select GENERIC_IRQ_PROBE + select HAVE_ARCH_JUMP_LABEL menu "Machine selection"
arch/mips/include/asm/jump_label.h new file +48 -0
48 lines not on this page · raw message
arch/mips/kernel/Makefile +2 -0
@@ -106,4 +106,6 @@ obj-$(CONFIG_MIPS_CPUFREQ) += cpufreq/ obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o +obj-$(CONFIG_JUMP_LABEL) += jump_label.o + CPPFLAGS_vmlinux.lds := $(KBUILD_CFLAGS)
arch/mips/kernel/jump_label.c new file +50 -0
50 lines not on this page · raw message
arch/mips/kernel/module.c +5 -0
@@ -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 {
@@ -390,6 +392,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 )
Signature · 1 line
1.7.2.3