Module Name: src
Committed By: palle
Date: Sun Aug 27 19:31:44 UTC 2017
Modified Files:
src/sys/arch/sparc64/sparc64: cpu.c
Log Message:
sun4v: Change clk and sclk variables to unsigned type so modern faster systems
with CPU frequencies above 2 Ghz are shown correctly. Example is a 3599.910 MHz
SPARC T5-2 system that otherwise is shown incorrectly as -695.-57 MHz. Based on
code from OpenBSD cpu.c rev. 1.41. Verified on sun4u using qemu and sun4v on
SPARC T5-2
To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/sparc64/sparc64/cpu.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/sparc64/sparc64/cpu.c
diff -u src/sys/arch/sparc64/sparc64/cpu.c:1.130 src/sys/arch/sparc64/sparc64/cpu.c:1.131
--- src/sys/arch/sparc64/sparc64/cpu.c:1.130 Fri Feb 10 23:26:23 2017
+++ src/sys/arch/sparc64/sparc64/cpu.c Sun Aug 27 19:31:43 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.130 2017/02/10 23:26:23 palle Exp $ */
+/* $NetBSD: cpu.c,v 1.131 2017/08/27 19:31:43 palle Exp $ */
/*
* Copyright (c) 1996
@@ -52,7 +52,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.130 2017/02/10 23:26:23 palle Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.131 2017/08/27 19:31:43 palle Exp $");
#include "opt_multiprocessor.h"
@@ -421,7 +421,7 @@ void
cpu_attach(device_t parent, device_t dev, void *aux)
{
int node;
- long clk, sclk = 0;
+ unsigned int clk, sclk = 0;
struct mainbus_attach_args *ma = aux;
struct cpu_info *ci;
const char *sep;