X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=init%2Fmain.c;h=9def935ab13a27c829e28bb2830cdbe2c6fd900d;hb=0e75182cf34ab7f7f1d88c1231fcc04780a7dc7d;hp=0eb1c7463fe4d08c3012ee66cb486c72122a26d5;hpb=71d441ddb51941d9d8279bdc858f965711b85c14;p=mv-sheeva.git diff --git a/init/main.c b/init/main.c index 0eb1c7463fe..9def935ab13 100644 --- a/init/main.c +++ b/init/main.c @@ -132,20 +132,9 @@ static char *static_command_line; static char *execute_command; static char *ramdisk_execute_command; +#ifdef CONFIG_SMP /* Setup configured maximum number of CPUs to activate */ -static unsigned int max_cpus = NR_CPUS; - -/* - * If set, this is an indication to the drivers that reset the underlying - * device before going ahead with the initialization otherwise driver might - * rely on the BIOS and skip the reset operation. - * - * This is useful if kernel is booting in an unreliable environment. - * For ex. kdump situaiton where previous kernel has crashed, BIOS has been - * skipped and devices will be in unknown state. - */ -unsigned int reset_devices; -EXPORT_SYMBOL(reset_devices); +static unsigned int __initdata max_cpus = NR_CPUS; /* * Setup routine for controlling SMP activation @@ -157,21 +146,44 @@ EXPORT_SYMBOL(reset_devices); * greater than 0, limits the maximum number of CPUs activated in * SMP mode to . */ +#ifndef CONFIG_X86_IO_APIC +static inline void disable_ioapic_setup(void) {}; +#endif + static int __init nosmp(char *str) { max_cpus = 0; - return 1; + disable_ioapic_setup(); + return 0; } -__setup("nosmp", nosmp); +early_param("nosmp", nosmp); static int __init maxcpus(char *str) { get_option(&str, &max_cpus); - return 1; + if (max_cpus == 0) + disable_ioapic_setup(); + + return 0; } -__setup("maxcpus=", maxcpus); +early_param("maxcpus", maxcpus); +#else +#define max_cpus NR_CPUS +#endif + +/* + * If set, this is an indication to the drivers that reset the underlying + * device before going ahead with the initialization otherwise driver might + * rely on the BIOS and skip the reset operation. + * + * This is useful if kernel is booting in an unreliable environment. + * For ex. kdump situaiton where previous kernel has crashed, BIOS has been + * skipped and devices will be in unknown state. + */ +unsigned int reset_devices; +EXPORT_SYMBOL(reset_devices); static int __init set_reset_devices(char *str) { @@ -453,7 +465,10 @@ static int __init do_early_param(char *param, char *val) struct obs_kernel_param *p; for (p = __setup_start; p < __setup_end; p++) { - if (p->early && strcmp(param, p->str) == 0) { + if ((p->early && strcmp(param, p->str) == 0) || + (strcmp(param, "console") == 0 && + strcmp(p->str, "earlycon") == 0) + ) { if (p->setup_func(val) != 0) printk(KERN_WARNING "Malformed early option '%s'\n", param); @@ -725,6 +740,15 @@ static void __init do_basic_setup(void) do_initcalls(); } +static int __initdata nosoftlockup; + +static int __init nosoftlockup_setup(char *str) +{ + nosoftlockup = 1; + return 1; +} +__setup("nosoftlockup", nosoftlockup_setup); + static void __init do_pre_smp_initcalls(void) { extern int spawn_ksoftirqd(void); @@ -734,7 +758,8 @@ static void __init do_pre_smp_initcalls(void) migration_init(); #endif spawn_ksoftirqd(); - spawn_softlockup_task(); + if (!nosoftlockup) + spawn_softlockup_task(); } static void run_init_process(char *init_filename)