| diff --git a/init/main.c b/init/main.c | |
| index b5cc0a7..640623a 100644 | |
| --- a/init/main.c | |
| +++ b/init/main.c | |
| @@ -68,6 +68,8 @@ | |
| #include <linux/shmem_fs.h> | |
| #include <linux/slab.h> | |
| #include <linux/perf_event.h> | |
| +#include <linux/console.h> | |
| +#include <linux/mm.h> | |
| #include <asm/io.h> | |
| #include <asm/bugs.h> | |
| @@ -462,6 +464,16 @@ static void __init mm_init(void) | |
| vmalloc_init(); | |
| } | |
| +static void contprint(void *dummy) | |
| +{ | |
| + int i; | |
| + | |
| + printk("%i-<", smp_processor_id()); | |
| + for (i = 0; i < 10; i++) | |
| + printk("%i-%i ", smp_processor_id(), i); | |
| + printk("%i->\n", smp_processor_id()); | |
| +} | |
| + | |
| asmlinkage void __init start_kernel(void) | |
| { | |
| char * command_line; | |
| @@ -562,6 +574,33 @@ asmlinkage void __init start_kernel(void) | |
| kmem_cache_init_late(); | |
| + console_lock(); | |
| + smp_call_function_single(0, contprint, NULL, 1); | |
| + smp_call_function_single(1, contprint, NULL, 1); | |
| + smp_call_function_single(0, contprint, NULL, 1); | |
| + smp_call_function_single(1, contprint, NULL, 1); | |
| + | |
| + show_free_areas(0); | |
| + | |
| + { | |
| + int i; | |
| + | |
| + pr_info("["); | |
| + for (i = 0; i < 4; i++) | |
| + pr_cont("%i ", i); | |
| + pr_cont("]\n"); | |
| + } | |
| + console_unlock(); | |
| + | |
| + { | |
| + int i; | |
| + | |
| + pr_info("["); | |
| + for (i = 0; i < 4; i++) | |
| + pr_cont("%i ", i); | |
| + pr_cont("]\n"); | |
| + } | |
| + | |
| /* | |
| * HACK ALERT! This is early. We're enabling the console before | |
| * we've done PCI setups etc, and console_init() must be aware of | |
| @@ -864,6 +903,13 @@ static int __init kernel_init(void * unused) | |
| do_basic_setup(); | |
| + console_lock(); | |
| + smp_call_function_single(0, contprint, NULL, 1); | |
| + smp_call_function_single(1, contprint, NULL, 1); | |
| + smp_call_function_single(0, contprint, NULL, 1); | |
| + smp_call_function_single(1, contprint, NULL, 1); | |
| + console_unlock(); | |
| + | |
| /* Open the /dev/console on the rootfs, this should never fail */ | |
| if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) | |
| printk(KERN_WARNING "Warning: unable to open an initial console.\n"); |