aboutsummaryrefslogtreecommitdiff
path: root/init
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-31 00:40:09 +1100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-31 00:40:09 +1100
commitdd430ca20c40ecccd6954a7efd13d4398f507728 (patch)
treeb65089436d17b2bcc6054ede2e335a821b50007f /init
parent60e233172eabdd1f831bd48631b9626ce2279d9b (diff)
parentafadcd788f37bfa62d92662e54a720c26c91becf (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86
* git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86: (890 commits) x86: fix nodemap_size according to nodeid bits x86: fix overlap between pagetable with bss section x86: add PCI IDs to k8topology_64.c x86: fix early_ioremap pagetable ops x86: use the same pgd_list for PAE and 64-bit x86: defer cr3 reload when doing pud_clear() x86: early boot debugging via FireWire (ohci1394_dma=early) x86: don't special-case pmd allocations as much x86: shrink some ifdefs in fault.c x86: ignore spurious faults x86: remove nx_enabled from fault.c x86: unify fault_32|64.c x86: unify fault_32|64.c with ifdefs x86: unify fault_32|64.c by ifdef'd function bodies x86: arch/x86/mm/init_32.c printk fixes x86: arch/x86/mm/init_32.c cleanup x86: arch/x86/mm/init_64.c printk fixes x86: unify ioremap x86: fixes some bugs about EFI memory map handling x86: use reboot_type on EFI 32 ...
Diffstat (limited to 'init')
-rw-r--r--init/main.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/init/main.c b/init/main.c
index f287ca5862b..cb81ed116f6 100644
--- a/init/main.c
+++ b/init/main.c
@@ -128,7 +128,7 @@ static char *ramdisk_execute_command;
#ifdef CONFIG_SMP
/* Setup configured maximum number of CPUs to activate */
-static unsigned int __initdata max_cpus = NR_CPUS;
+unsigned int __initdata setup_max_cpus = NR_CPUS;
/*
* Setup routine for controlling SMP activation
@@ -146,7 +146,7 @@ static inline void disable_ioapic_setup(void) {};
static int __init nosmp(char *str)
{
- max_cpus = 0;
+ setup_max_cpus = 0;
disable_ioapic_setup();
return 0;
}
@@ -155,8 +155,8 @@ early_param("nosmp", nosmp);
static int __init maxcpus(char *str)
{
- get_option(&str, &max_cpus);
- if (max_cpus == 0)
+ get_option(&str, &setup_max_cpus);
+ if (setup_max_cpus == 0)
disable_ioapic_setup();
return 0;
@@ -164,7 +164,7 @@ static int __init maxcpus(char *str)
early_param("maxcpus", maxcpus);
#else
-#define max_cpus NR_CPUS
+#define setup_max_cpus NR_CPUS
#endif
/*
@@ -318,6 +318,10 @@ static int __init unknown_bootoption(char *param, char *val)
return 0;
}
+#ifdef CONFIG_DEBUG_PAGEALLOC
+int __read_mostly debug_pagealloc_enabled = 0;
+#endif
+
static int __init init_setup(char *str)
{
unsigned int i;
@@ -363,7 +367,7 @@ static inline void smp_prepare_cpus(unsigned int maxcpus) { }
#else
-#ifdef __GENERIC_PER_CPU
+#ifndef CONFIG_HAVE_SETUP_PER_CPU_AREA
unsigned long __per_cpu_offset[NR_CPUS] __read_mostly;
EXPORT_SYMBOL(__per_cpu_offset);
@@ -384,7 +388,7 @@ static void __init setup_per_cpu_areas(void)
ptr += size;
}
}
-#endif /* !__GENERIC_PER_CPU */
+#endif /* CONFIG_HAVE_SETUP_PER_CPU_AREA */
/* Called by boot processor to activate the rest. */
static void __init smp_init(void)
@@ -393,7 +397,7 @@ static void __init smp_init(void)
/* FIXME: This should be done in userspace --RR */
for_each_present_cpu(cpu) {
- if (num_online_cpus() >= max_cpus)
+ if (num_online_cpus() >= setup_max_cpus)
break;
if (!cpu_online(cpu))
cpu_up(cpu);
@@ -401,7 +405,7 @@ static void __init smp_init(void)
/* Any cleanup work */
printk(KERN_INFO "Brought up %ld CPUs\n", (long)num_online_cpus());
- smp_cpus_done(max_cpus);
+ smp_cpus_done(setup_max_cpus);
}
#endif
@@ -552,6 +556,7 @@ asmlinkage void __init start_kernel(void)
preempt_disable();
build_all_zonelists();
page_alloc_init();
+ enable_debug_pagealloc();
printk(KERN_NOTICE "Kernel command line: %s\n", boot_command_line);
parse_early_param();
parse_args("Booting kernel", static_command_line, __start___param,
@@ -824,7 +829,7 @@ static int __init kernel_init(void * unused)
__set_special_pids(1, 1);
cad_pid = task_pid(current);
- smp_prepare_cpus(max_cpus);
+ smp_prepare_cpus(setup_max_cpus);
do_pre_smp_initcalls();