summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2007-05-27 21:05:35 +0000
committermarcel <marcel@FreeBSD.org>2007-05-27 21:05:35 +0000
commit9983edfa3a3e5d5fa9c3f9135110c60c0789da4a (patch)
tree6e1f8dbc8fcf9add6a16d47625185c5a44bded0f /sys
parent79a2e408120d207be00a63c991d92c31c218bfeb (diff)
downloadFreeBSD-src-9983edfa3a3e5d5fa9c3f9135110c60c0789da4a.zip
FreeBSD-src-9983edfa3a3e5d5fa9c3f9135110c60c0789da4a.tar.gz
Don't initialize the decrementer before initclocks() is called.
Use cpu_initclocks() for that as it assures that relevant locks have been initialized.
Diffstat (limited to 'sys')
-rw-r--r--sys/powerpc/aim/clock.c7
-rw-r--r--sys/powerpc/aim/machdep.c12
-rw-r--r--sys/powerpc/powerpc/clock.c7
-rw-r--r--sys/powerpc/powerpc/machdep.c12
4 files changed, 14 insertions, 24 deletions
diff --git a/sys/powerpc/aim/clock.c b/sys/powerpc/aim/clock.c
index 0b51f1c..4b03d36 100644
--- a/sys/powerpc/aim/clock.c
+++ b/sys/powerpc/aim/clock.c
@@ -211,13 +211,6 @@ decr_intr(struct trapframe *frame)
}
void
-cpu_initclocks(void)
-{
-
- return;
-}
-
-void
decr_init(void)
{
int qhandle, phandle;
diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c
index 4d1d8e2..6f31c87 100644
--- a/sys/powerpc/aim/machdep.c
+++ b/sys/powerpc/aim/machdep.c
@@ -188,11 +188,6 @@ cpu_startup(void *dummy)
{
/*
- * Initialise the decrementer-based clock.
- */
- decr_init();
-
- /*
* Good {morning,afternoon,evening,night}.
*/
cpu_setup(PCPU_GET(cpuid));
@@ -715,6 +710,13 @@ cpu_boot(int howto)
{
}
+void
+cpu_initclocks(void)
+{
+
+ decr_init();
+}
+
/* Get current clock frequency for the given cpu id. */
int
cpu_est_clockrate(int cpu_id, uint64_t *rate)
diff --git a/sys/powerpc/powerpc/clock.c b/sys/powerpc/powerpc/clock.c
index 0b51f1c..4b03d36 100644
--- a/sys/powerpc/powerpc/clock.c
+++ b/sys/powerpc/powerpc/clock.c
@@ -211,13 +211,6 @@ decr_intr(struct trapframe *frame)
}
void
-cpu_initclocks(void)
-{
-
- return;
-}
-
-void
decr_init(void)
{
int qhandle, phandle;
diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c
index 4d1d8e2..6f31c87 100644
--- a/sys/powerpc/powerpc/machdep.c
+++ b/sys/powerpc/powerpc/machdep.c
@@ -188,11 +188,6 @@ cpu_startup(void *dummy)
{
/*
- * Initialise the decrementer-based clock.
- */
- decr_init();
-
- /*
* Good {morning,afternoon,evening,night}.
*/
cpu_setup(PCPU_GET(cpuid));
@@ -715,6 +710,13 @@ cpu_boot(int howto)
{
}
+void
+cpu_initclocks(void)
+{
+
+ decr_init();
+}
+
/* Get current clock frequency for the given cpu id. */
int
cpu_est_clockrate(int cpu_id, uint64_t *rate)
OpenPOWER on IntegriCloud