linux-stable/arch/x86
Steven Rostedt 8115f3f0c9 ftrace: use a real variable for ftrace_nop in x86
Impact: avoid section mismatch warning, clean up

The dynamic ftrace determines which nop is safe to use at start up.
When it finds a safe nop for patching, it sets a pointer called ftrace_nop
to point to the code. All call sites are then patched to this nop.

Later, when tracing is turned on, this ftrace_nop variable is again used
to compare the location to make sure it is a nop before we update it to
an mcount call. If this fails just once, a warning is printed and ftrace
is disabled.

Rakib Mullick noted that the code that sets up the nop is a .init section
where as the nop itself is in the .text section. This is needed because
the nop is used later on after boot up. The problem is that the test of the
nop jumps back to the setup code and causes a "section mismatch" warning.

Rakib first recommended to convert the nop to .init.text, but as stated
above, this would fail since that text is used later.

The real solution is to extend Rabik's patch, and to make the ftrace_nop
into an array, and just save the code from the assembly to this array.

Now the section can stay as an init section, and we have a nop to use
later on.

Reported-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-10-27 16:52:01 +01:00
..
boot Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-10-23 12:38:39 -07:00
configs x86: remove irqbalance in kernel for 32 bit 2008-10-16 16:52:52 +02:00
crypto crypto: crc32c - Use Intel CRC32 instruction 2008-08-29 15:49:50 +10:00
ia32 compat: generic compat get/settimeofday 2008-10-16 11:21:33 -07:00
include/asm Merge commit 'v2.6.28-rc2' into tracing/urgent 2008-10-27 10:50:54 +01:00
kernel ftrace: use a real variable for ftrace_nop in x86 2008-10-27 16:52:01 +01:00
kvm Merge commit 'linus/master' into merge-linus 2008-10-17 09:20:26 -07:00
lguest x86: make 32bit support per_cpu vector 2008-10-16 16:52:53 +02:00
lib Merge branch 'x86/unify-cpu-detect' into x86-v28-for-linus-phase4-D 2008-10-11 20:23:20 +02:00
mach-default Merge branches 'x86/prototypes', 'x86/x2apic' and 'x86/debug' into x86/core 2008-08-14 14:58:22 +02:00
mach-generic x86: make 32bit support per_cpu vector 2008-10-16 16:52:53 +02:00
mach-rdc321x removed unused #include <linux/version.h>'s 2008-08-23 12:14:12 -07:00
mach-voyager generic: sparse irqs: use irq_desc() together with dyn_array, instead of irq_desc[] 2008-10-16 16:52:29 +02:00
math-emu
mm Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip 2008-10-23 12:38:39 -07:00
oprofile oprofile: fixing whitespaces in arch/x86/oprofile/* 2008-10-16 17:17:46 +02:00
pci x86/PCI: irq and pci_ids patch for Intel Ibex Peak DeviceIDs 2008-10-20 10:53:48 -07:00
power Merge branch 'x86/unify-cpu-detect' into x86-v28-for-linus-phase4-D 2008-10-11 20:23:20 +02:00
vdso Merge branches 'x86/urgent', 'x86/amd-iommu', 'x86/apic', 'x86/cleanups', 'x86/core', 'x86/cpu', 'x86/fixmap', 'x86/gart', 'x86/kprobes', 'x86/memtest', 'x86/modules', 'x86/nmi', 'x86/pat', 'x86/reboot', 'x86/setup', 'x86/step', 'x86/unify-pci', 'x86/uv', 'x86/xen' and 'xen-64bit' into x86/for-linus 2008-07-21 16:37:17 +02:00
video
xen Merge branch 'tracing/ftrace' into tracing/urgent 2008-10-22 09:08:14 +02:00
Kconfig Merge commit 'v2.6.28-rc2' into tracing/urgent 2008-10-27 10:50:54 +01:00
Kconfig.cpu x86: adjust dependencies for CONFIG_X86_CMOV 2008-10-13 10:33:50 +02:00
Kconfig.debug x86: usb debug port early console, fix 2008-07-26 17:32:30 +02:00
Makefile x86, um: ... and asm-x86 move 2008-10-22 22:55:20 -07:00
Makefile_32.cpu x86: merge winchip-2 and winchip-2a cpu choices 2008-10-13 10:22:48 +02:00