x86, cpu: Clean up and unify the NOP selection infrastructure

Clean up and unify the NOP selection infrastructure:

- Make the atomic 5-byte NOP a part of the selection system.
- Pick NOPs once during early boot and then be done with it.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jason Baron <jbaron@redhat.com>
Link: http://lkml.kernel.org/r/1303166160-10315-3-git-send-email-hpa@linux.intel.com
This commit is contained in:
H. Peter Anvin
2011-04-18 15:19:51 -07:00
parent b1e7734f02
commit dc326fca2b
6 changed files with 191 additions and 162 deletions

View File

@@ -260,9 +260,9 @@ do_ftrace_mod_code(unsigned long ip, void *new_code)
return mod_code_status;
}
static unsigned char *ftrace_nop_replace(void)
static const unsigned char *ftrace_nop_replace(void)
{
return ideal_nop5;
return ideal_nops[NOP_ATOMIC5];
}
static int