Loading arch/sh/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ config SUPERH32 select HAVE_KPROBES select HAVE_KRETPROBES select HAVE_ARCH_TRACEHOOK if !SH_FPU select HAVE_FTRACE config SUPERH64 def_bool y if CPU_SH5 Loading arch/sh/boot/compressed/Makefile_32 +5 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,11 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \ LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) ifeq ($(CONFIG_FTRACE),y) ORIG_CFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) endif LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE Loading arch/sh/kernel/entry-common.S +44 −0 Original line number Diff line number Diff line Loading @@ -371,3 +371,47 @@ syscall_exit: #endif 7: .long do_syscall_trace_enter 8: .long do_syscall_trace_leave #ifdef CONFIG_FTRACE .align 2 .globl _mcount .type _mcount,@function .globl mcount .type mcount,@function _mcount: mcount: mov.l r4, @-r15 mov.l r5, @-r15 mov.l r6, @-r15 mov.l r7, @-r15 sts.l pr, @-r15 mov.l @(20,r15),r4 sts pr, r5 mov.l 1f, r6 mov.l ftrace_stub, r7 cmp/eq r6, r7 bt skip_trace mov.l @r6, r6 jsr @r6 nop skip_trace: lds.l @r15+, pr mov.l @r15+, r7 mov.l @r15+, r6 mov.l @r15+, r5 rts mov.l @r15+, r4 .align 2 1: .long ftrace_trace_function .globl ftrace_stub ftrace_stub: rts nop #endif /* CONFIG_FTRACE */ arch/sh/kernel/sh_ksyms_32.c +4 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ #include <asm/delay.h> #include <asm/tlbflush.h> #include <asm/cacheflush.h> #include <asm/ftrace.h> extern int dump_fpu(struct pt_regs *, elf_fpregset_t *); extern struct hw_interrupt_type no_irq_type; Loading Loading @@ -133,6 +134,9 @@ EXPORT_SYMBOL(__flush_purge_region); EXPORT_SYMBOL(clear_user_page); #endif #ifdef CONFIG_FTRACE EXPORT_SYMBOL(mcount); #endif EXPORT_SYMBOL(csum_partial); EXPORT_SYMBOL(csum_partial_copy_generic); #ifdef CONFIG_IPV6 Loading Loading
arch/sh/Kconfig +1 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ config SUPERH32 select HAVE_KPROBES select HAVE_KRETPROBES select HAVE_ARCH_TRACEHOOK if !SH_FPU select HAVE_FTRACE config SUPERH64 def_bool y if CPU_SH5 Loading
arch/sh/boot/compressed/Makefile_32 +5 −0 Original line number Diff line number Diff line Loading @@ -23,6 +23,11 @@ IMAGE_OFFSET := $(shell /bin/bash -c 'printf "0x%08x" \ LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) ifeq ($(CONFIG_FTRACE),y) ORIG_CFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) endif LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup -T $(obj)/../../kernel/vmlinux.lds $(obj)/vmlinux: $(OBJECTS) $(obj)/piggy.o $(LIBGCC) FORCE Loading
arch/sh/kernel/entry-common.S +44 −0 Original line number Diff line number Diff line Loading @@ -371,3 +371,47 @@ syscall_exit: #endif 7: .long do_syscall_trace_enter 8: .long do_syscall_trace_leave #ifdef CONFIG_FTRACE .align 2 .globl _mcount .type _mcount,@function .globl mcount .type mcount,@function _mcount: mcount: mov.l r4, @-r15 mov.l r5, @-r15 mov.l r6, @-r15 mov.l r7, @-r15 sts.l pr, @-r15 mov.l @(20,r15),r4 sts pr, r5 mov.l 1f, r6 mov.l ftrace_stub, r7 cmp/eq r6, r7 bt skip_trace mov.l @r6, r6 jsr @r6 nop skip_trace: lds.l @r15+, pr mov.l @r15+, r7 mov.l @r15+, r6 mov.l @r15+, r5 rts mov.l @r15+, r4 .align 2 1: .long ftrace_trace_function .globl ftrace_stub ftrace_stub: rts nop #endif /* CONFIG_FTRACE */
arch/sh/kernel/sh_ksyms_32.c +4 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ #include <asm/delay.h> #include <asm/tlbflush.h> #include <asm/cacheflush.h> #include <asm/ftrace.h> extern int dump_fpu(struct pt_regs *, elf_fpregset_t *); extern struct hw_interrupt_type no_irq_type; Loading Loading @@ -133,6 +134,9 @@ EXPORT_SYMBOL(__flush_purge_region); EXPORT_SYMBOL(clear_user_page); #endif #ifdef CONFIG_FTRACE EXPORT_SYMBOL(mcount); #endif EXPORT_SYMBOL(csum_partial); EXPORT_SYMBOL(csum_partial_copy_generic); #ifdef CONFIG_IPV6 Loading