diff options
author | Shaohua Li <shaohua.li@intel.com> | 2009-01-08 22:29:49 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-14 06:11:31 -0500 |
commit | a14a07b8018b714e03a39ff2180c66e307ef4238 (patch) | |
tree | 7c4b9249f862969b80b74e5e11e56480b0e3d15c /arch/ia64/kernel/Makefile | |
parent | d3e75ff14bc1453c4762428395aac9953a023efc (diff) |
ftrace, ia64: IA64 dynamic ftrace support
IA64 dynamic ftrace support.
The original _mcount stub for each function is like:
alloc r40=ar.pfs,12,8,0
mov r43=r0;;
mov r42=b0
mov r41=r1
nop.i 0x0
br.call.sptk.many b0 = _mcount;;
The patch convert it to below for nop:
[MII] nop.m 0x0
mov r3=ip
nop.i 0x0
[MLX] nop.m 0x0
nop.x 0x0;;
This isn't completely nop, as there is one instuction 'mov r3=ip', but
it should be light and harmless for code follow it.
And below is for call
[MII] nop.m 0x0
mov r3=ip
nop.i 0x0
[MLX] nop.m 0x0
brl.many .;;
In this way, only one instruction is changed to convert code between nop
and call. This should meet dyn-ftrace's requirement.
But this requires CPU support brl instruction, so dyn-ftrace isn't
supported for old Itanium system. Assume there are quite few such old
system running.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/ia64/kernel/Makefile')
-rw-r--r-- | arch/ia64/kernel/Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile index c381ea954892..ab6e7ec0bba3 100644 --- a/arch/ia64/kernel/Makefile +++ b/arch/ia64/kernel/Makefile | |||
@@ -2,6 +2,10 @@ | |||
2 | # Makefile for the linux kernel. | 2 | # Makefile for the linux kernel. |
3 | # | 3 | # |
4 | 4 | ||
5 | ifdef CONFIG_DYNAMIC_FTRACE | ||
6 | CFLAGS_REMOVE_ftrace.o = -pg | ||
7 | endif | ||
8 | |||
5 | extra-y := head.o init_task.o vmlinux.lds | 9 | extra-y := head.o init_task.o vmlinux.lds |
6 | 10 | ||
7 | obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o \ | 11 | obj-y := acpi.o entry.o efi.o efi_stub.o gate-data.o fsys.o ia64_ksyms.o irq.o irq_ia64.o \ |
@@ -28,6 +32,7 @@ obj-$(CONFIG_IA64_CYCLONE) += cyclone.o | |||
28 | obj-$(CONFIG_CPU_FREQ) += cpufreq/ | 32 | obj-$(CONFIG_CPU_FREQ) += cpufreq/ |
29 | obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o | 33 | obj-$(CONFIG_IA64_MCA_RECOVERY) += mca_recovery.o |
30 | obj-$(CONFIG_KPROBES) += kprobes.o jprobes.o | 34 | obj-$(CONFIG_KPROBES) += kprobes.o jprobes.o |
35 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o | ||
31 | obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o | 36 | obj-$(CONFIG_KEXEC) += machine_kexec.o relocate_kernel.o crash.o |
32 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o | 37 | obj-$(CONFIG_CRASH_DUMP) += crash_dump.o |
33 | obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o | 38 | obj-$(CONFIG_IA64_UNCACHED_ALLOCATOR) += uncached.o |