aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel/alternative.c
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2007-05-02 13:27:16 -0400
committerAndi Kleen <andi@basil.nowhere.org>2007-05-02 13:27:16 -0400
commit959b4fdfe7e27bcf101e2381e500e4076f2bb9ce (patch)
tree65406ba086d3547ac1570639a8e7e42345191ed4 /arch/i386/kernel/alternative.c
parent752783c050f1729452a89b2baea45b0124ac91c7 (diff)
[PATCH] i386: PARAVIRT: Allow boot-time disable of paravirt_ops patching
Add "noreplace-paravirt" to disable paravirt_ops patching. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch/i386/kernel/alternative.c')
-rw-r--r--arch/i386/kernel/alternative.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c
index c5d037c60950..080a59d56ea6 100644
--- a/arch/i386/kernel/alternative.c
+++ b/arch/i386/kernel/alternative.c
@@ -30,6 +30,16 @@ static int __init setup_noreplace_smp(char *str)
30} 30}
31__setup("noreplace-smp", setup_noreplace_smp); 31__setup("noreplace-smp", setup_noreplace_smp);
32 32
33#ifdef CONFIG_PARAVIRT
34static int noreplace_paravirt = 0;
35
36static int __init setup_noreplace_paravirt(char *str)
37{
38 noreplace_paravirt = 1;
39 return 1;
40}
41__setup("noreplace-paravirt", setup_noreplace_paravirt);
42#endif
33 43
34#define DPRINTK(fmt, args...) if (debug_alternative) \ 44#define DPRINTK(fmt, args...) if (debug_alternative) \
35 printk(KERN_DEBUG fmt, args) 45 printk(KERN_DEBUG fmt, args)
@@ -330,6 +340,9 @@ void apply_paravirt(struct paravirt_patch_site *start,
330{ 340{
331 struct paravirt_patch_site *p; 341 struct paravirt_patch_site *p;
332 342
343 if (noreplace_paravirt)
344 return;
345
333 for (p = start; p < end; p++) { 346 for (p = start; p < end; p++) {
334 unsigned int used; 347 unsigned int used;
335 348