patch-2.1.37 linux/init/main.c

Next file: linux/ipc/msg.c
Previous file: linux/include/net/tcp.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.36/linux/init/main.c linux/init/main.c
@@ -68,6 +68,7 @@
 extern long console_init(long, long);
 extern long kmalloc_init(long,long);
 extern void sock_init(void);
+extern void uidcache_init(void);
 extern unsigned long pci_init(unsigned long, unsigned long);
 extern long mca_init(long, long);
 extern long sbus_init(long, long);
@@ -175,6 +176,9 @@
 #ifdef CONFIG_ISDN_DRV_HISAX
 extern void HiSax_setup(char *str, int *ints);
 #endif
+#ifdef CONFIG_DIGIEPCA
+extern void epca_setup(char *str, int *ints);
+#endif
 #ifdef CONFIG_ISDN_DRV_PCBIT
 extern void pcbit_setup(char *str, int *ints);
 #endif
@@ -191,6 +195,9 @@
 extern void wd33c93_setup (char *str, int *ints);
 extern void gvp11_setup (char *str, int *ints);
 
+#ifdef CONFIG_CYCLADES
+extern void cy_setup(char *str, int *ints);
+#endif
 #ifdef CONFIG_DIGI
 extern void pcxx_setup(char *str, int *ints);
 #endif
@@ -257,7 +264,7 @@
 static char * argv_init[MAX_INIT_ARGS+2] = { "init", NULL, };
 static char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, };
 
-__initfunc(char *get_options(char *str, int *ints))
+char *get_options(char *str, int *ints)
 {
 	char *cur = str;
 	int i=1;
@@ -478,9 +485,15 @@
 #if defined(CONFIG_GVP11_SCSI)
 	{ "gvp11=", gvp11_setup },
 #endif
+#ifdef CONFIG_CYCLADES
+	{ "cyclades=", cy_setup },
+#endif
 #ifdef CONFIG_DIGI
 	{ "digi=", pcxx_setup },
 #endif
+#ifdef CONFIG_DIGIEPCA
+	{ "digiepca=", epca_setup },
+#endif
 #ifdef CONFIG_RISCOM8
 	{ "riscom8=", riscom8_setup },
 #endif
@@ -638,6 +651,7 @@
 		{ "gscd",    0x1000 },
 		{ "sbpcd",   0x1900 },
 		{ "sonycd",  0x1800 },
+		{ "eda",     0x2400 },
 		{ "eza",     0x2800 },
 		{ "bpcd",    0x2900 },
 #if CONFIG_APBLOCK
@@ -779,43 +793,11 @@
  
 extern int cpu_idle(void * unused);
 
-/*
- *	Activate a secondary processor.
- */
- 
-__initfunc(asmlinkage void start_secondary(void))
-{
-	trap_init();
-	init_IRQ();
-	smp_callin();
-	cpu_idle(NULL);
-}
-
-
-
 /* Called by boot processor to activate the rest. */
 __initfunc(static void smp_init(void))
 {
-	int i, j;
-
 	/* Get other processors into their bootup holding patterns. */
 	smp_boot_cpus();
-
-	/* Create the slave init tasks as sharing pid 0.  This should only
-	 * happen if we have virtual CPU numbers higher than 0.
-	 */
-	for (i=1; i<smp_num_cpus; i++)
-	{
-		/* We use kernel_thread for the idlers which are
-		 * unlocked tasks running in kernel space.
-		 */
-		kernel_thread(cpu_idle, NULL, CLONE_PID);
-
-		/* Don't assume linear processor numbering */
-		j = cpu_logical_map[i];
-		current_set[j]=task[i];
-		current_set[j]->processor=j;
-	}
 }		
 
 /*
@@ -832,6 +814,8 @@
 	
 #endif
 
+extern void initialize_secondary(void);
+
 /*
  *	Activate the first processor.
  */
@@ -840,18 +824,14 @@
 {
 	char * command_line;
 
-/*
- *	This little check will move.
- */
-
 #ifdef __SMP__
-	static int first_cpu=1;
-	
-	if(!first_cpu)
-		start_secondary();
-	first_cpu=0;
-	
-#endif	
+	static int boot_cpu = 1;
+	/* "current" has been set up, we need to load it now */
+	if (!boot_cpu)
+		initialize_secondary();
+	boot_cpu = 0;
+#endif
+
 /*
  * Interrupts are still disabled. Do necessary setups, then
  * enable them
@@ -896,7 +876,6 @@
 	memory_start = kmem_cache_init(memory_start, memory_end);
 	sti();
 	calibrate_delay();
-	memory_start = file_table_init(memory_start,memory_end);
 	memory_start = name_cache_init(memory_start,memory_end);
 #ifdef CONFIG_BLK_DEV_INITRD
 	if (initrd_start && !initrd_below_start_ok && initrd_start < memory_start) {
@@ -910,9 +889,11 @@
 	proc_root_init();
 #endif
 	kmem_cache_sizes_init();
+	uidcache_init();
 	vma_init();
 	buffer_init();
 	inode_init();
+	file_table_init();
 	sock_init();
 #if defined(CONFIG_SYSVIPC) || defined(CONFIG_KERNELD)
 	ipc_init();

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov