Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/booke Only attach tc on primary cpu.



details:   https://anonhg.NetBSD.org/src/rev/c06c1782ef9f
branches:  trunk
changeset: 766645:c06c1782ef9f
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Jun 29 05:56:31 2011 +0000

description:
Only attach tc on primary cpu.

diffstat:

 sys/arch/powerpc/booke/e500_timer.c |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (38 lines):

diff -r 4a3532006c41 -r c06c1782ef9f sys/arch/powerpc/booke/e500_timer.c
--- a/sys/arch/powerpc/booke/e500_timer.c       Wed Jun 29 05:55:47 2011 +0000
+++ b/sys/arch/powerpc/booke/e500_timer.c       Wed Jun 29 05:56:31 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: e500_timer.c,v 1.3 2011/06/25 00:07:10 matt Exp $      */
+/*     $NetBSD: e500_timer.c,v 1.4 2011/06/29 05:56:31 matt Exp $      */
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: e500_timer.c,v 1.3 2011/06/25 00:07:10 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: e500_timer.c,v 1.4 2011/06/29 05:56:31 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -53,9 +53,6 @@
 #include <powerpc/booke/e500var.h>
 #include <powerpc/booke/openpicreg.h>
 
-/*
- * Initially we assume a processor with a bus frequency of 12.5 MHz.
- */
 static u_long ns_per_tick;
 
 static void init_ppcbooke_tc(void);
@@ -174,7 +171,8 @@
        openpic_write(cpu, cpu->cpu_clock_gtbcr,
             cpu->cpu_ticks_per_clock_intr);
 
-       init_ppcbooke_tc();
+       if (CPU_IS_PRIMARY(ci))
+               init_ppcbooke_tc();
 }
 
 void



Home | Main Index | Thread Index | Old Index