aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--Documentation/kernel-parameters.txt3
-rw-r--r--arch/i386/kernel/alternative.c13
2 files changed, 16 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 242b3a09b6ce..38d7db3262c7 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -64,6 +64,7 @@ parameter is applicable:
64 GENERIC_TIME The generic timeofday code is enabled. 64 GENERIC_TIME The generic timeofday code is enabled.
65 NFS Appropriate NFS support is enabled. 65 NFS Appropriate NFS support is enabled.
66 OSS OSS sound support is enabled. 66 OSS OSS sound support is enabled.
67 PV_OPS A paravirtualized kernel
67 PARIDE The ParIDE subsystem is enabled. 68 PARIDE The ParIDE subsystem is enabled.
68 PARISC The PA-RISC architecture is enabled. 69 PARISC The PA-RISC architecture is enabled.
69 PCI PCI bus support is enabled. 70 PCI PCI bus support is enabled.
@@ -1164,6 +1165,8 @@ and is between 256 and 4096 characters. It is defined in the file
1164 1165
1165 nomce [IA-32] Machine Check Exception 1166 nomce [IA-32] Machine Check Exception
1166 1167
1168 noreplace-paravirt [IA-32,PV_OPS] Don't patch paravirt_ops
1169
1167 noreplace-smp [IA-32,SMP] Don't replace SMP instructions 1170 noreplace-smp [IA-32,SMP] Don't replace SMP instructions
1168 with UP alternatives 1171 with UP alternatives
1169 1172
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