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 Use clockfreq() to print a system t...
details: https://anonhg.NetBSD.org/src/rev/5771279cd738
branches: trunk
changeset: 797718:5771279cd738
user: nakayama <nakayama%NetBSD.org@localhost>
date: Fri Jul 25 17:54:50 2014 +0000
description:
Use clockfreq() to print a system tick frequency.
The stick-frequency of Fire V100 is 5555555Hz and printing it as
5.555MHz instead of 5MHz is more precise.
diffstat:
sys/arch/sparc64/sparc64/clock.c | 17 +++++++++--------
sys/arch/sparc64/sparc64/cpu.c | 8 ++++----
2 files changed, 13 insertions(+), 12 deletions(-)
diffs (80 lines):
diff -r 565ebd98f8eb -r 5771279cd738 sys/arch/sparc64/sparc64/clock.c
--- a/sys/arch/sparc64/sparc64/clock.c Fri Jul 25 17:53:59 2014 +0000
+++ b/sys/arch/sparc64/sparc64/clock.c Fri Jul 25 17:54:50 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: clock.c,v 1.116 2014/06/10 18:27:41 palle Exp $ */
+/* $NetBSD: clock.c,v 1.117 2014/07/25 17:54:50 nakayama Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.116 2014/06/10 18:27:41 palle Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.117 2014/07/25 17:54:50 nakayama Exp $");
#include "opt_multiprocessor.h"
@@ -511,16 +511,17 @@
if (ci->ci_system_clockrate[0] == 0) {
aprint_normal("No counter-timer -- using %%tick "
- "at %luMHz as system clock.\n",
- (unsigned long)ci->ci_cpu_clockrate[1]);
+ "at %sMHz as system clock.\n",
+ clockfreq(ci->ci_cpu_clockrate[0]));
/* We don't have a counter-timer -- use %tick */
tickintr_establish(PIL_CLOCK, tickintr);
} else if (CPU_ISSUN4U && CPU_IS_HUMMINGBIRD()) {
#if NPSYCHO > 0
aprint_normal("No counter-timer -- using STICK "
- "at %luMHz as system clock.\n",
- (unsigned long)ci->ci_system_clockrate[1]);
+ "at %sMHz as system clock.\n",
+ clockfreq(ci->ci_system_clockrate[0]));
+
/* We don't have a counter-timer -- use STICK */
stick2eintr_establish(PIL_CLOCK, stick2eintr);
#else
@@ -528,8 +529,8 @@
#endif
} else {
aprint_normal("No counter-timer -- using %%stick "
- "at %luMHz as system clock.\n",
- (unsigned long)ci->ci_system_clockrate[1]);
+ "at %sMHz as system clock.\n",
+ clockfreq(ci->ci_system_clockrate[0]));
/* We don't have a counter-timer -- use %stick */
stickintr_establish(PIL_CLOCK, stickintr);
diff -r 565ebd98f8eb -r 5771279cd738 sys/arch/sparc64/sparc64/cpu.c
--- a/sys/arch/sparc64/sparc64/cpu.c Fri Jul 25 17:53:59 2014 +0000
+++ b/sys/arch/sparc64/sparc64/cpu.c Fri Jul 25 17:54:50 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.114 2014/07/25 17:21:32 nakayama Exp $ */
+/* $NetBSD: cpu.c,v 1.115 2014/07/25 17:54:50 nakayama Exp $ */
/*
* Copyright (c) 1996
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.114 2014/07/25 17:21:32 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.115 2014/07/25 17:54:50 nakayama Exp $");
#include "opt_multiprocessor.h"
@@ -349,8 +349,8 @@
aprint_naive("\n");
if (ci->ci_system_clockrate[0] != 0) {
- aprint_normal_dev(dev, "system tick frequency %d MHz\n",
- (int)ci->ci_system_clockrate[1]);
+ aprint_normal_dev(dev, "system tick frequency %s MHz\n",
+ clockfreq(ci->ci_system_clockrate[0]));
}
aprint_normal_dev(dev, "");
Home |
Main Index |
Thread Index |
Old Index