Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc64/sparc64 Make timecounter "tick-counter" man...
details: https://anonhg.NetBSD.org/src/rev/b9d91c7cc616
branches: trunk
changeset: 789564:b9d91c7cc616
user: nakayama <nakayama%NetBSD.org@localhost>
date: Thu Aug 22 10:00:43 2013 +0000
description:
Make timecounter "tick-counter" mandatory.
diffstat:
sys/arch/sparc64/sparc64/clock.c | 36 ++++++++++++++++++++----------------
1 files changed, 20 insertions(+), 16 deletions(-)
diffs (64 lines):
diff -r 4716fff3c1bc -r b9d91c7cc616 sys/arch/sparc64/sparc64/clock.c
--- a/sys/arch/sparc64/sparc64/clock.c Thu Aug 22 09:57:30 2013 +0000
+++ b/sys/arch/sparc64/sparc64/clock.c Thu Aug 22 10:00:43 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.109 2013/08/20 19:19:23 macallan Exp $ */
+/* $NetBSD: clock.c,v 1.110 2013/08/22 10:00:43 nakayama Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.109 2013/08/20 19:19:23 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.110 2013/08/22 10:00:43 nakayama Exp $");
#include "opt_multiprocessor.h"
@@ -462,19 +462,23 @@
/* Initialize the %tick register */
settick(0);
- if (ci->ci_system_clockrate[0] == 0) {
- tick_timecounter.tc_frequency = ci->ci_cpu_clockrate[0];
- tc_init(&tick_timecounter);
- } else if(CPU_IS_HUMMINGBIRD()) {
- psycho_setstick(0);
- stick2e_timecounter.tc_frequency =
- ci->ci_system_clockrate[0];
- tc_init(&stick2e_timecounter);
- } else {
- setstick(0);
- stick_timecounter.tc_frequency =
- ci->ci_system_clockrate[0];
- tc_init(&stick_timecounter);
+ /* Register timecounter "tick-counter" */
+ tick_timecounter.tc_frequency = ci->ci_cpu_clockrate[0];
+ tc_init(&tick_timecounter);
+
+ /* Register timecounter "stick-counter" */
+ if (ci->ci_system_clockrate[0] != 0) {
+ if (CPU_IS_HUMMINGBIRD()) {
+ psycho_setstick(0);
+ stick2e_timecounter.tc_frequency =
+ ci->ci_system_clockrate[0];
+ tc_init(&stick2e_timecounter);
+ } else {
+ setstick(0);
+ stick_timecounter.tc_frequency =
+ ci->ci_system_clockrate[0];
+ tc_init(&stick_timecounter);
+ }
}
/*
@@ -490,7 +494,7 @@
/* We don't have a counter-timer -- use %tick */
tickintr_establish(PIL_CLOCK, tickintr);
- } else if(CPU_IS_HUMMINGBIRD()) {
+ } else if (CPU_IS_HUMMINGBIRD()) {
aprint_normal("No counter-timer -- using STICK "
"at %luMHz as system clock.\n",
(unsigned long)ci->ci_system_clockrate[1]);
Home |
Main Index |
Thread Index |
Old Index