diff options
Diffstat (limited to 'arch/i386/kernel/alternative.c')
-rw-r--r-- | arch/i386/kernel/alternative.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c index 9b8e85a8edec..915b6c4d9baf 100644 --- a/arch/i386/kernel/alternative.c +++ b/arch/i386/kernel/alternative.c | |||
@@ -334,19 +334,7 @@ void apply_paravirt(struct paravirt_patch *start, struct paravirt_patch *end) | |||
334 | 334 | ||
335 | used = paravirt_ops.patch(p->instrtype, p->clobbers, p->instr, | 335 | used = paravirt_ops.patch(p->instrtype, p->clobbers, p->instr, |
336 | p->len); | 336 | p->len); |
337 | #ifdef CONFIG_DEBUG_PARAVIRT | 337 | |
338 | { | ||
339 | int i; | ||
340 | /* Deliberately clobber regs using "not %reg" to find bugs. */ | ||
341 | for (i = 0; i < 3; i++) { | ||
342 | if (p->len - used >= 2 && (p->clobbers & (1 << i))) { | ||
343 | memcpy(p->instr + used, "\xf7\xd0", 2); | ||
344 | p->instr[used+1] |= i; | ||
345 | used += 2; | ||
346 | } | ||
347 | } | ||
348 | } | ||
349 | #endif | ||
350 | /* Pad the rest with nops */ | 338 | /* Pad the rest with nops */ |
351 | nop_out(p->instr + used, p->len - used); | 339 | nop_out(p->instr + used, p->len - used); |
352 | } | 340 | } |