Loading arch/arm/Kconfig +2 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ config ARM select HAVE_OPROFILE select HAVE_KPROBES if (!XIP_KERNEL) select HAVE_KRETPROBES if (HAVE_KPROBES) select HAVE_FTRACE if (!XIP_KERNEL) select HAVE_DYNAMIC_FTRACE if (HAVE_FTRACE) help The ARM series is a line of low-power-consumption RISC chip designs licensed by ARM Ltd and targeted at embedded applications and Loading arch/arm/boot/compressed/Makefile +6 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,12 @@ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ targets := vmlinux vmlinux.lds piggy.gz piggy.o font.o font.c \ head.o misc.o $(OBJS) ifeq ($(CONFIG_FTRACE),y) ORIG_CFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) endif EXTRA_CFLAGS := -fpic -fno-builtin EXTRA_AFLAGS := Loading arch/arm/kernel/Makefile +5 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,10 @@ AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET) ifdef CONFIG_DYNAMIC_FTRACE CFLAGS_REMOVE_ftrace.o = -pg endif # Object file lists. obj-y := compat.o entry-armv.o entry-common.o irq.o \ Loading @@ -18,6 +22,7 @@ obj-$(CONFIG_ARTHUR) += arthur.o obj-$(CONFIG_ISA_DMA) += dma-isa.o obj-$(CONFIG_PCI) += bios32.o isa.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o obj-$(CONFIG_KPROBES) += kprobes.o kprobes-decode.o obj-$(CONFIG_ATAGS_PROC) += atags.o Loading arch/arm/kernel/armksyms.c +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,11 @@ extern void __aeabi_ulcmp(void); extern void fpundefinstr(void); extern void fp_enter(void); #ifdef CONFIG_FTRACE extern void mcount(void); EXPORT_SYMBOL(mcount); #endif /* * This has a special calling convention; it doesn't * modify any of the usual registers, except for LR. Loading arch/arm/kernel/entry-common.S +47 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,53 @@ ENTRY(ret_from_fork) #undef CALL #define CALL(x) .long x #ifdef CONFIG_FTRACE #ifdef CONFIG_DYNAMIC_FTRACE ENTRY(mcount) stmdb sp!, {r0-r3, lr} mov r0, lr .globl mcount_call mcount_call: bl ftrace_stub ldmia sp!, {r0-r3, pc} ENTRY(ftrace_caller) stmdb sp!, {r0-r3, lr} ldr r1, [fp, #-4] mov r0, lr .globl ftrace_call ftrace_call: bl ftrace_stub ldmia sp!, {r0-r3, pc} #else ENTRY(mcount) stmdb sp!, {r0-r3, lr} ldr r0, =ftrace_trace_function ldr r2, [r0] adr r0, ftrace_stub cmp r0, r2 bne trace ldmia sp!, {r0-r3, pc} trace: ldr r1, [fp, #-4] mov r0, lr mov lr, pc mov pc, r2 ldmia sp!, {r0-r3, pc} #endif /* CONFIG_DYNAMIC_FTRACE */ .globl ftrace_stub ftrace_stub: mov pc, lr #endif /* CONFIG_FTRACE */ /*============================================================================= * SWI handler *----------------------------------------------------------------------------- Loading Loading
arch/arm/Kconfig +2 −0 Original line number Diff line number Diff line Loading @@ -14,6 +14,8 @@ config ARM select HAVE_OPROFILE select HAVE_KPROBES if (!XIP_KERNEL) select HAVE_KRETPROBES if (HAVE_KPROBES) select HAVE_FTRACE if (!XIP_KERNEL) select HAVE_DYNAMIC_FTRACE if (HAVE_FTRACE) help The ARM series is a line of low-power-consumption RISC chip designs licensed by ARM Ltd and targeted at embedded applications and Loading
arch/arm/boot/compressed/Makefile +6 −0 Original line number Diff line number Diff line Loading @@ -69,6 +69,12 @@ SEDFLAGS = s/TEXT_START/$(ZTEXTADDR)/;s/BSS_START/$(ZBSSADDR)/ targets := vmlinux vmlinux.lds piggy.gz piggy.o font.o font.c \ head.o misc.o $(OBJS) ifeq ($(CONFIG_FTRACE),y) ORIG_CFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS)) endif EXTRA_CFLAGS := -fpic -fno-builtin EXTRA_AFLAGS := Loading
arch/arm/kernel/Makefile +5 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,10 @@ AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET) ifdef CONFIG_DYNAMIC_FTRACE CFLAGS_REMOVE_ftrace.o = -pg endif # Object file lists. obj-y := compat.o entry-armv.o entry-common.o irq.o \ Loading @@ -18,6 +22,7 @@ obj-$(CONFIG_ARTHUR) += arthur.o obj-$(CONFIG_ISA_DMA) += dma-isa.o obj-$(CONFIG_PCI) += bios32.o isa.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o obj-$(CONFIG_KPROBES) += kprobes.o kprobes-decode.o obj-$(CONFIG_ATAGS_PROC) += atags.o Loading
arch/arm/kernel/armksyms.c +5 −0 Original line number Diff line number Diff line Loading @@ -48,6 +48,11 @@ extern void __aeabi_ulcmp(void); extern void fpundefinstr(void); extern void fp_enter(void); #ifdef CONFIG_FTRACE extern void mcount(void); EXPORT_SYMBOL(mcount); #endif /* * This has a special calling convention; it doesn't * modify any of the usual registers, except for LR. Loading
arch/arm/kernel/entry-common.S +47 −0 Original line number Diff line number Diff line Loading @@ -99,6 +99,53 @@ ENTRY(ret_from_fork) #undef CALL #define CALL(x) .long x #ifdef CONFIG_FTRACE #ifdef CONFIG_DYNAMIC_FTRACE ENTRY(mcount) stmdb sp!, {r0-r3, lr} mov r0, lr .globl mcount_call mcount_call: bl ftrace_stub ldmia sp!, {r0-r3, pc} ENTRY(ftrace_caller) stmdb sp!, {r0-r3, lr} ldr r1, [fp, #-4] mov r0, lr .globl ftrace_call ftrace_call: bl ftrace_stub ldmia sp!, {r0-r3, pc} #else ENTRY(mcount) stmdb sp!, {r0-r3, lr} ldr r0, =ftrace_trace_function ldr r2, [r0] adr r0, ftrace_stub cmp r0, r2 bne trace ldmia sp!, {r0-r3, pc} trace: ldr r1, [fp, #-4] mov r0, lr mov lr, pc mov pc, r2 ldmia sp!, {r0-r3, pc} #endif /* CONFIG_DYNAMIC_FTRACE */ .globl ftrace_stub ftrace_stub: mov pc, lr #endif /* CONFIG_FTRACE */ /*============================================================================= * SWI handler *----------------------------------------------------------------------------- Loading