patch-2.3.16 linux/arch/ppc/kernel/setup.c

Next file: linux/arch/ppc/kernel/signal.c
Previous file: linux/arch/ppc/kernel/semaphore.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.15/linux/arch/ppc/kernel/setup.c linux/arch/ppc/kernel/setup.c
@@ -1,5 +1,5 @@
 /*
- * $Id: setup.c,v 1.138 1999/07/11 16:32:21 cort Exp $
+ * $Id: setup.c,v 1.146 1999/08/31 06:54:08 davem Exp $
  * Common prep/pmac/chrp boot and setup code.
  */
 
@@ -12,6 +12,7 @@
 #include <linux/delay.h>
 #include <linux/blk.h>
 
+#include <asm/init.h>
 #include <asm/adb.h>
 #include <asm/cuda.h>
 #include <asm/pmu.h>
@@ -63,6 +64,12 @@
                       unsigned long r6,
                       unsigned long r7);
 
+extern void gemini_init(unsigned long r3,
+                      unsigned long r4,
+                      unsigned long r5,
+                      unsigned long r6,
+                      unsigned long r7);
+
 extern boot_infos_t *boot_infos;
 extern char cmd_line[512];
 char saved_command_line[256];
@@ -121,11 +128,11 @@
 /*
  * I really need to add multiple-console support... -- Cort
  */
-__initfunc(int pmac_display_supported(char *name))
+int __init pmac_display_supported(char *name)
 {
 	return 0;
 }
-__initfunc(void pmac_find_display(void))
+void __init pmac_find_display(void)
 {
 }
 
@@ -267,6 +274,15 @@
 			
 			cpu_node = find_type_devices("cpu");
 			if ( !cpu_node ) break;
+			{
+				int s;
+				for ( s = 0; (s < i) && cpu_node->next ;
+				      s++, cpu_node = cpu_node->next )
+					/* nothing */ ;
+				if ( s != i )
+					printk("get_cpuinfo(): ran out of "
+					       "cpu nodes.\n");
+			}
 			fp = (int *) get_property(cpu_node, "clock-frequency", NULL);
 			if ( !fp ) break;
 			len += sprintf(len+buffer, "clock\t\t: %dMHz\n",
@@ -392,6 +408,8 @@
 	_machine = _MACH_fads;
 #elif defined(CONFIG_APUS)
 	_machine = _MACH_apus;
+#elif defined(CONFIG_GEMINI)
+	_machine = _MACH_gemini;
 #else
 #error "Machine not defined correctly"
 #endif /* CONFIG_APUS */
@@ -475,6 +493,9 @@
                 mbx_init(r3, r4, r5, r6, r7);
                 break;
 #endif
+	case _MACH_gemini:
+		gemini_init(r3, r4, r5, r6, r7);
+		break;
 	default:
 		printk("Unknown machine type in identify_machine!\n");
 	}
@@ -500,16 +521,18 @@
 	}
 }
 
-__initfunc(void
-	   ppc_init(void))
+void __init ppc_init(void)
 {
+	/* clear the progress line */
+	if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff);
+	
 	if (ppc_md.init != NULL) {
 		ppc_md.init();
 	}
 }
 
-__initfunc(void setup_arch(char **cmdline_p,
-			   unsigned long * memory_start_p, unsigned long * memory_end_p))
+void __init setup_arch(char **cmdline_p,
+		       unsigned long * memory_start_p, unsigned long * memory_end_p)
 {
 	extern int panic_timeout;
 	extern char _etext[], _edata[];
@@ -526,7 +549,7 @@
  
 	/* reboot on panic */	
 	panic_timeout = 180;
-	
+
 	init_mm.start_code = PAGE_OFFSET;
 	init_mm.end_code = (unsigned long) _etext;
 	init_mm.end_data = (unsigned long) _edata;
@@ -541,7 +564,7 @@
 
 	ppc_md.setup_arch(memory_start_p, memory_end_p);
 	/* clear the progress line */
-	if ( ppc_md.progress ) ppc_md.progress(" ", 0xffff);
+	if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab);
 }
 
 void ppc_generic_ide_fix_driveid(struct hd_driveid *id)

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)