diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2007-05-02 13:27:13 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-05-02 13:27:13 -0400 |
commit | 7f63c41c6c57371a0931da3940c6620c2301442c (patch) | |
tree | 57e394455667c61213cfeea3c40c4dfcd1bd973d /arch | |
parent | 4cdf6bc2476157f397f3b71a9bd4e23c7a7aaf80 (diff) |
[PATCH] i386: PARAVIRT: Remove CONFIG_DEBUG_PARAVIRT
Remove CONFIG_DEBUG_PARAVIRT. When inlining code, this option
attempts to trash registers in the patch-site's "clobber" field, on
the grounds that this should find bugs with incorrect clobbers.
Unfortunately, the clobber field really means "registers modified by
this patch site", which includes return values.
Because of this, this option has outlived its usefulness, so remove
it.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/i386/Kconfig.debug | 10 | ||||
-rw-r--r-- | arch/i386/kernel/alternative.c | 14 |
2 files changed, 1 insertions, 23 deletions
diff --git a/arch/i386/Kconfig.debug b/arch/i386/Kconfig.debug index 458bc1611933..b31c0802e1cc 100644 --- a/arch/i386/Kconfig.debug +++ b/arch/i386/Kconfig.debug | |||
@@ -85,14 +85,4 @@ config DOUBLEFAULT | |||
85 | option saves about 4k and might cause you much additional grey | 85 | option saves about 4k and might cause you much additional grey |
86 | hair. | 86 | hair. |
87 | 87 | ||
88 | config DEBUG_PARAVIRT | ||
89 | bool "Enable some paravirtualization debugging" | ||
90 | default n | ||
91 | depends on PARAVIRT && DEBUG_KERNEL | ||
92 | help | ||
93 | Currently deliberately clobbers regs which are allowed to be | ||
94 | clobbered in inlined paravirt hooks, even in native mode. | ||
95 | If turning this off solves a problem, then DISABLE_INTERRUPTS() or | ||
96 | ENABLE_INTERRUPTS() is lying about what registers can be clobbered. | ||
97 | |||
98 | endmenu | 88 | endmenu |
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 | } |