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

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

diff -u --new-file --recursive --exclude-from /usr/src/exclude v2.2.17/arch/ppc/kernel/setup.c linux/arch/ppc/kernel/setup.c
@@ -31,6 +31,7 @@
 #endif
 #include <asm/bootx.h>
 #include <asm/machdep.h>
+#include <asm/uaccess.h>
 
 extern void pmac_init(unsigned long r3,
                       unsigned long r4,
@@ -68,9 +69,6 @@
                       unsigned long r6,
                       unsigned long r7);
 
-#ifdef CONFIG_BOOTX_TEXT
-extern void map_bootx_text(void);
-#endif
 #ifdef CONFIG_XMON
 extern void xmon_map_scc(void);
 #endif
@@ -98,6 +96,12 @@
 
 struct machdep_calls ppc_md;
 
+#ifdef CONFIG_MAGIC_SYSRQ
+unsigned long SYSRQ_KEY;
+#endif /* CONFIG_MAGIC_SYSRQ */
+#ifdef CONFIG_VGA_CONSOLE
+unsigned long vgacon_remap_base;
+#endif
 
 /* copy of the residual data */
 #ifndef CONFIG_MBX
@@ -313,19 +317,11 @@
 			       (GET_PVR & 0xff00) >> 8, GET_PVR & 0xff);
 
 		len += sprintf(buffer+len, "bogomips\t: %lu.%02lu\n",
-			       (CD(loops_per_sec)+2500)/500000,
-			       (CD(loops_per_sec)+2500)/5000 % 100);
-		bogosum += CD(loops_per_sec);
+			       (CD(loops_per_jiffy)+2500)/(500000/HZ),
+			       (CD(loops_per_jiffy)+2500)/(5000/HZ) % 100);
+		bogosum += CD(loops_per_jiffy);
 	}
 
-#ifdef __SMP__
-	if ( i )
-		len += sprintf(buffer+len, "\n");
-	len += sprintf(buffer+len,"total bogomips\t: %lu.%02lu\n",
-		       (bogosum+2500)/500000,
-		       (bogosum+2500)/5000 % 100);
-#endif /* __SMP__ */
-
 	/*
 	 * Ooh's and aah's info about zero'd pages in idle task
 	 */ 
@@ -490,15 +486,21 @@
 
 	switch (_machine)
 	{
+#ifdef CONFIG_POWERMAC
 	case _MACH_Pmac:
                 pmac_init(r3, r4, r5, r6, r7);
 		break;
+#endif
+#if defined(CONFIG_ALL_PPC) || defined(CONFIG_PREP)
 	case _MACH_prep:
                 prep_init(r3, r4, r5, r6, r7);
 		break;
+#endif
+#if defined(CONFIG_ALL_PPC) || defined(CONFIG_CHRP)
 	case _MACH_chrp:
                 chrp_init(r3, r4, r5, r6, r7);
 		break;
+#endif
 #ifdef CONFIG_APUS
 	case _MACH_apus:
                 apus_init(r3, r4, r5, r6, r7);
@@ -557,7 +559,8 @@
 		unsigned long val = simple_strtoul(str, NULL, 0);
 		printk(KERN_INFO "l2cr set to %lx\n", val);
 		_set_L2CR(0);
-		_set_L2CR(val);
+		if (val)
+			_set_L2CR(val);
 	}
 }
 
@@ -578,9 +581,6 @@
 	extern unsigned long find_available_memory(void);
 	extern unsigned long *end_of_DRAM;
 
-#ifdef CONFIG_BOOTX_TEXT
-	map_bootx_text();
-#endif
 
 #ifdef CONFIG_XMON
 	{
@@ -610,8 +610,16 @@
 	*memory_end_p = (unsigned long) end_of_DRAM;
 
 	ppc_md.setup_arch(memory_start_p, memory_end_p);
+
+	sort_exception_table();
 }
 
+#ifndef CONFIG_POWERMAC
+void note_bootable_part(kdev_t dev, int part, int goodness)
+{
+}
+#endif
+
 void ppc_generic_ide_fix_driveid(struct hd_driveid *id)
 {
         int i;
@@ -713,7 +721,7 @@
 	id->word123        = __le16_to_cpu(id->word123);
 	id->word124        = __le16_to_cpu(id->word124);
 	id->word125        = __le16_to_cpu(id->word125);
-	id->word126        = __le16_to_cpu(id->word126);
+	id->last_lun       = __le16_to_cpu(id->last_lun);
 	id->word127        = __le16_to_cpu(id->word127);
 	id->security       = __le16_to_cpu(id->security);
 	for (i=0; i<127; i++)

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