Module Name:    src
Committed By:   matt
Date:           Sat Dec 11 17:12:44 UTC 2010

Modified Files:
        src/sys/arch/evbppc/pmppc: machdep.c

Log Message:
Don't init cpu_initclocks too early since that results in decrementer
exceptions before the exceptions have been setup.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbppc/pmppc/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/evbppc/pmppc/machdep.c
diff -u src/sys/arch/evbppc/pmppc/machdep.c:1.8 src/sys/arch/evbppc/pmppc/machdep.c:1.9
--- src/sys/arch/evbppc/pmppc/machdep.c:1.8	Sat Nov 21 17:40:28 2009
+++ src/sys/arch/evbppc/pmppc/machdep.c	Sat Dec 11 17:12:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.8 2009/11/21 17:40:28 rmind Exp $	*/
+/*	$NetBSD: machdep.c,v 1.9 2010/12/11 17:12:44 matt Exp $	*/
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.8 2009/11/21 17:40:28 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.9 2010/12/11 17:12:44 matt Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
@@ -164,17 +164,6 @@
 void pmppc_setup(void);
 void setleds(int leds);
 
-/*
- * Force cpu_info to be in the data segment to avoid the
- * memset() blowing away the data set up by locore.S.
- */
-#if 0
- /* this is defined in powerpc/oea/cpu_subr.c, I don't understand the above
-  * comment however.
-  */
-struct cpu_info cpu_info[1] = { { .ci_curlwp = &lwp0, }, };
-#endif
-
 void
 initppc(u_int startkernel, u_int endkernel, u_int args, void *btinfo)
 {
@@ -205,14 +194,6 @@
 		panic("bus_space_init failed");
 
 	/*
-	 * Get CPU clock
-	 */
-	ticks_per_sec = a_config.a_bus_freq;
-	ticks_per_sec /= 4;	/* 4 cycles per DEC tick */
-	cpu_timebase = ticks_per_sec;
-	cpu_initclocks();
-
-	/*
 	 * Initialize the BAT registers
 	 */
 	oea_batinit(
@@ -227,6 +208,13 @@
 	oea_init(NULL);
 
 	/*
+	 * Get CPU clock
+	 */
+	ticks_per_sec = a_config.a_bus_freq;
+	ticks_per_sec /= 4;	/* 4 cycles per DEC tick */
+	cpu_timebase = ticks_per_sec;
+
+	/*
 	 * Set up console.
 	 */
 	consinit();		/* XXX should not be here */

Reply via email to