diff options
| author | Len Brown <len.brown@intel.com> | 2007-08-24 22:19:05 -0400 |
|---|---|---|
| committer | Len Brown <len.brown@intel.com> | 2007-08-24 22:19:05 -0400 |
| commit | 5a16eff86dc1194a17c69250492e820d828e3bde (patch) | |
| tree | a0f990ce8682d7108f6fbd7f9d3c90a8d318d9b8 | |
| parent | 2e0f4c7b383063abc274c4a088043383a3735b93 (diff) | |
| parent | 61ec7567db103d537329b0db9a887db570431ff4 (diff) | |
Pull bugzilla-1641 into release branch
| -rw-r--r-- | Documentation/kernel-parameters.txt | 15 | ||||
| -rw-r--r-- | arch/i386/kernel/io_apic.c | 8 | ||||
| -rw-r--r-- | arch/x86_64/kernel/io_apic.c | 8 | ||||
| -rw-r--r-- | include/asm-i386/io_apic.h | 1 | ||||
| -rw-r--r-- | include/asm-x86_64/io_apic.h | 6 | ||||
| -rw-r--r-- | init/main.c | 12 |
6 files changed, 25 insertions, 25 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 975f029be25c..17770b456310 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt | |||
| @@ -952,14 +952,10 @@ and is between 256 and 4096 characters. It is defined in the file | |||
| 952 | Format: <1-256> | 952 | Format: <1-256> |
| 953 | 953 | ||
| 954 | maxcpus= [SMP] Maximum number of processors that an SMP kernel | 954 | maxcpus= [SMP] Maximum number of processors that an SMP kernel |
| 955 | should make use of. | 955 | should make use of. maxcpus=n : n >= 0 limits the |
| 956 | Using "nosmp" or "maxcpus=0" will disable SMP | 956 | kernel to using 'n' processors. n=0 is a special case, |
| 957 | entirely (the MPS table probe still happens, though). | 957 | it is equivalent to "nosmp", which also disables |
| 958 | A command-line option of "maxcpus=<NUM>", where <NUM> | 958 | the IO APIC. |
| 959 | is an integer greater than 0, limits the maximum number | ||
| 960 | of CPUs activated in SMP mode to <NUM>. | ||
| 961 | Using "maxcpus=1" on an SMP kernel is the trivial | ||
| 962 | case of an SMP kernel with only one CPU. | ||
| 963 | 959 | ||
| 964 | max_addr=[KMG] [KNL,BOOT,ia64] All physical memory greater than or | 960 | max_addr=[KMG] [KNL,BOOT,ia64] All physical memory greater than or |
| 965 | equal to this physical address is ignored. | 961 | equal to this physical address is ignored. |
| @@ -1184,7 +1180,8 @@ and is between 256 and 4096 characters. It is defined in the file | |||
| 1184 | 1180 | ||
| 1185 | nosep [BUGS=X86-32] Disables x86 SYSENTER/SYSEXIT support. | 1181 | nosep [BUGS=X86-32] Disables x86 SYSENTER/SYSEXIT support. |
| 1186 | 1182 | ||
| 1187 | nosmp [SMP] Tells an SMP kernel to act as a UP kernel. | 1183 | nosmp [SMP] Tells an SMP kernel to act as a UP kernel, |
| 1184 | and disable the IO APIC. legacy for "maxcpus=0". | ||
| 1188 | 1185 | ||
| 1189 | nosoftlockup [KNL] Disable the soft-lockup detector. | 1186 | nosoftlockup [KNL] Disable the soft-lockup detector. |
| 1190 | 1187 | ||
diff --git a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c index 4b8a8da4b2e0..e2f4a1c68547 100644 --- a/arch/i386/kernel/io_apic.c +++ b/arch/i386/kernel/io_apic.c | |||
| @@ -754,14 +754,6 @@ static int pirq_entries [MAX_PIRQS]; | |||
| 754 | static int pirqs_enabled; | 754 | static int pirqs_enabled; |
| 755 | int skip_ioapic_setup; | 755 | int skip_ioapic_setup; |
| 756 | 756 | ||
| 757 | static int __init ioapic_setup(char *str) | ||
| 758 | { | ||
| 759 | skip_ioapic_setup = 1; | ||
| 760 | return 1; | ||
| 761 | } | ||
| 762 | |||
| 763 | __setup("noapic", ioapic_setup); | ||
| 764 | |||
| 765 | static int __init ioapic_pirq_setup(char *str) | 757 | static int __init ioapic_pirq_setup(char *str) |
| 766 | { | 758 | { |
| 767 | int i, max; | 759 | int i, max; |
diff --git a/arch/x86_64/kernel/io_apic.c b/arch/x86_64/kernel/io_apic.c index f57f8b901912..966fa1062491 100644 --- a/arch/x86_64/kernel/io_apic.c +++ b/arch/x86_64/kernel/io_apic.c | |||
| @@ -397,14 +397,12 @@ static void clear_IO_APIC (void) | |||
| 397 | int skip_ioapic_setup; | 397 | int skip_ioapic_setup; |
| 398 | int ioapic_force; | 398 | int ioapic_force; |
| 399 | 399 | ||
| 400 | /* dummy parsing: see setup.c */ | 400 | static int __init parse_noapic(char *str) |
| 401 | |||
| 402 | static int __init disable_ioapic_setup(char *str) | ||
| 403 | { | 401 | { |
| 404 | skip_ioapic_setup = 1; | 402 | disable_ioapic_setup(); |
| 405 | return 0; | 403 | return 0; |
| 406 | } | 404 | } |
| 407 | early_param("noapic", disable_ioapic_setup); | 405 | early_param("noapic", parse_noapic); |
| 408 | 406 | ||
| 409 | /* Actually the next is obsolete, but keep it for paranoid reasons -AK */ | 407 | /* Actually the next is obsolete, but keep it for paranoid reasons -AK */ |
| 410 | static int __init disable_timer_pin_setup(char *arg) | 408 | static int __init disable_timer_pin_setup(char *arg) |
diff --git a/include/asm-i386/io_apic.h b/include/asm-i386/io_apic.h index 340764076d5f..dbe734ddf2af 100644 --- a/include/asm-i386/io_apic.h +++ b/include/asm-i386/io_apic.h | |||
| @@ -150,7 +150,6 @@ extern int (*ioapic_renumber_irq)(int ioapic, int irq); | |||
| 150 | 150 | ||
| 151 | #else /* !CONFIG_X86_IO_APIC */ | 151 | #else /* !CONFIG_X86_IO_APIC */ |
| 152 | #define io_apic_assign_pci_irqs 0 | 152 | #define io_apic_assign_pci_irqs 0 |
| 153 | static inline void disable_ioapic_setup(void) { } | ||
| 154 | #endif | 153 | #endif |
| 155 | 154 | ||
| 156 | #endif | 155 | #endif |
diff --git a/include/asm-x86_64/io_apic.h b/include/asm-x86_64/io_apic.h index 969d225a9350..d9f2e54324d5 100644 --- a/include/asm-x86_64/io_apic.h +++ b/include/asm-x86_64/io_apic.h | |||
| @@ -109,6 +109,12 @@ extern int mpc_default_type; | |||
| 109 | /* 1 if "noapic" boot option passed */ | 109 | /* 1 if "noapic" boot option passed */ |
| 110 | extern int skip_ioapic_setup; | 110 | extern int skip_ioapic_setup; |
| 111 | 111 | ||
| 112 | static inline void disable_ioapic_setup(void) | ||
| 113 | { | ||
| 114 | skip_ioapic_setup = 1; | ||
| 115 | } | ||
| 116 | |||
| 117 | |||
| 112 | /* | 118 | /* |
| 113 | * If we use the IO-APIC for IRQ routing, disable automatic | 119 | * If we use the IO-APIC for IRQ routing, disable automatic |
| 114 | * assignment of PCI IRQ's. | 120 | * assignment of PCI IRQ's. |
diff --git a/init/main.c b/init/main.c index d3bcb3b11620..cc0653ec081d 100644 --- a/init/main.c +++ b/init/main.c | |||
| @@ -146,9 +146,14 @@ static unsigned int __initdata max_cpus = NR_CPUS; | |||
| 146 | * greater than 0, limits the maximum number of CPUs activated in | 146 | * greater than 0, limits the maximum number of CPUs activated in |
| 147 | * SMP mode to <NUM>. | 147 | * SMP mode to <NUM>. |
| 148 | */ | 148 | */ |
| 149 | #ifndef CONFIG_X86_IO_APIC | ||
| 150 | static inline void disable_ioapic_setup(void) {}; | ||
| 151 | #endif | ||
| 152 | |||
| 149 | static int __init nosmp(char *str) | 153 | static int __init nosmp(char *str) |
| 150 | { | 154 | { |
| 151 | max_cpus = 0; | 155 | max_cpus = 0; |
| 156 | disable_ioapic_setup(); | ||
| 152 | return 0; | 157 | return 0; |
| 153 | } | 158 | } |
| 154 | 159 | ||
| @@ -157,10 +162,13 @@ early_param("nosmp", nosmp); | |||
| 157 | static int __init maxcpus(char *str) | 162 | static int __init maxcpus(char *str) |
| 158 | { | 163 | { |
| 159 | get_option(&str, &max_cpus); | 164 | get_option(&str, &max_cpus); |
| 160 | return 1; | 165 | if (max_cpus == 0) |
| 166 | disable_ioapic_setup(); | ||
| 167 | |||
| 168 | return 0; | ||
| 161 | } | 169 | } |
| 162 | 170 | ||
| 163 | __setup("maxcpus=", maxcpus); | 171 | early_param("maxcpus=", maxcpus); |
| 164 | #else | 172 | #else |
| 165 | #define max_cpus NR_CPUS | 173 | #define max_cpus NR_CPUS |
| 166 | #endif | 174 | #endif |
