aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/msr.c
diff options
context:
space:
mode:
authorSteven Rostedt <rostedt@goodmis.org>2008-10-24 09:12:17 -0400
committerIngo Molnar <mingo@elte.hu>2008-10-27 16:52:01 +0100
commit8115f3f0c939c5db0fe3c6c6c58911fd3a205b1e (patch)
tree576fef732087f789999c1fbab97a09c12ea167e7 /arch/x86/kernel/msr.c
parentea31e72d753e5817a97de552f152d0cb55c7defc (diff)
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>
Diffstat (limited to 'arch/x86/kernel/msr.c')
0 files changed, 0 insertions, 0 deletions