blob: 02e333c014b430465936ee694ea181089647e9f7 [file] [log] [blame]
diff --git a/init/main.c b/init/main.c
index b5cc0a7..23a72d6 100644
--- a/init/main.c
+++ b/init/main.c
@@ -68,6 +68,7 @@
#include <linux/shmem_fs.h>
#include <linux/slab.h>
#include <linux/perf_event.h>
+#include <linux/console.h>
#include <asm/io.h>
#include <asm/bugs.h>
@@ -462,6 +463,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 +573,24 @@ 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);
+ {
+ int i, j;
+
+ for (i = 0; i < 8; i++) {
+ printk("\n+++");
+ for (j = 0; j < 8; j++)
+ printk("-%i-%i-", i, j);
+ }
+ printk("\n");
+ }
+
+ console_unlock();
+
/*
* 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 +893,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");