diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index c638228..ac73a38 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -277,11 +277,14 @@ void __init_or_module apply_alternatives(struct alt_instr *start, for (a = start; a < end; a++) { instr = (u8 *)&a->instr_offset + a->instr_offset; replacement = (u8 *)&a->repl_offset + a->repl_offset; + printk(KERN_ERR "start=%p a=%d instr_offset=%d instr=%pS repl_offset=%d repl=%pS instrlen=%d repllen=%d\n", start, (int)(a-start), a->instr_offset, instr, a->repl_offset, replacement, (int)a->instrlen, (int)a->replacementlen); BUG_ON(a->replacementlen > a->instrlen); BUG_ON(a->instrlen > sizeof(insnbuf)); BUG_ON(a->cpuid >= NCAPINTS*32); - if (!boot_cpu_has(a->cpuid)) + if (!boot_cpu_has(a->cpuid)) { + printk(KERN_ERR " no change\n"); continue; + } memcpy(insnbuf, replacement, a->replacementlen); @@ -293,6 +296,8 @@ void __init_or_module apply_alternatives(struct alt_instr *start, a->instrlen - a->replacementlen); text_poke_early(instr, insnbuf, a->instrlen); + + printk(KERN_ERR " done\n"); } } @@ -533,7 +538,9 @@ void __init alternative_instructions(void) * patching. */ + printk(KERN_ERR "About to apply_alternatives\n"); apply_alternatives(__alt_instructions, __alt_instructions_end); + printk(KERN_ERR "apply_alternatives done\n"); /* switch to patch-once-at-boottime-only mode and free the * tables in case we know the number of CPUs will never ever