Commit fa6f2cc77081792e4edca9168420a3422299ef15

Authored by Jason Baron
Committed by Steven Rostedt
1 parent f49aa44856

jump label: Make text_poke_early() globally visible

Make text_poke_early available outside of alternative.c. The jump label
patchset wants to make use of it in order to set up the optimal no-op
sequences at run-time.

Signed-off-by: Jason Baron <jbaron@redhat.com>
LKML-Reference: <04cfddf2ba77bcabfc3e524f1849d871d6a1cf9d.1284733808.git.jbaron@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

Showing 2 changed files with 4 additions and 2 deletions Side-by-side Diff

arch/x86/include/asm/alternative.h
... ... @@ -160,6 +160,8 @@
160 160 #define __parainstructions_end NULL
161 161 #endif
162 162  
  163 +extern void *text_poke_early(void *addr, const void *opcode, size_t len);
  164 +
163 165 /*
164 166 * Clear and restore the kernel write-protection flag on the local CPU.
165 167 * Allows the kernel to edit read-only pages.
arch/x86/kernel/alternative.c
... ... @@ -195,7 +195,7 @@
195 195  
196 196 extern struct alt_instr __alt_instructions[], __alt_instructions_end[];
197 197 extern s32 __smp_locks[], __smp_locks_end[];
198   -static void *text_poke_early(void *addr, const void *opcode, size_t len);
  198 +void *text_poke_early(void *addr, const void *opcode, size_t len);
199 199  
200 200 /* Replace instructions with better alternatives for this CPU type.
201 201 This runs before SMP is initialized to avoid SMP problems with
... ... @@ -522,7 +522,7 @@
522 522 * instructions. And on the local CPU you need to be protected again NMI or MCE
523 523 * handlers seeing an inconsistent instruction while you patch.
524 524 */
525   -static void *__init_or_module text_poke_early(void *addr, const void *opcode,
  525 +void *__init_or_module text_poke_early(void *addr, const void *opcode,
526 526 size_t len)
527 527 {
528 528 unsigned long flags;