From 5e3939b59bbbc89ff2aa9fb70743fa9ea0db9088 Mon Sep 17 00:00:00 2001 From: Mark Peek Date: Sat, 22 Jun 2002 16:30:18 +0000 Subject: [PATCH] Clock frequencies reported by sysctl should be unsigned values. Discovered when machdep.tsc_freq returned a negative number on a 2.2GHz Xeon. Submitted by: Brian Harrison Reviewed by: phk MFC after: 1 week --- sys/amd64/amd64/tsc.c | 4 ++-- sys/amd64/isa/clock.c | 4 ++-- sys/i386/i386/tsc.c | 4 ++-- sys/i386/isa/clock.c | 4 ++-- sys/isa/atrtc.c | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sys/amd64/amd64/tsc.c b/sys/amd64/amd64/tsc.c index 29c895834074..52e19325cdf0 100644 --- a/sys/amd64/amd64/tsc.c +++ b/sys/amd64/amd64/tsc.c @@ -1203,7 +1203,7 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, i8254_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_i8254_freq, "I", ""); + 0, sizeof(u_int), sysctl_machdep_i8254_freq, "IU", ""); static int sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) @@ -1223,7 +1223,7 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_tsc_freq, "I", ""); + 0, sizeof(u_int), sysctl_machdep_tsc_freq, "IU", ""); static unsigned i8254_get_timecount(struct timecounter *tc) diff --git a/sys/amd64/isa/clock.c b/sys/amd64/isa/clock.c index 29c895834074..52e19325cdf0 100644 --- a/sys/amd64/isa/clock.c +++ b/sys/amd64/isa/clock.c @@ -1203,7 +1203,7 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, i8254_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_i8254_freq, "I", ""); + 0, sizeof(u_int), sysctl_machdep_i8254_freq, "IU", ""); static int sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) @@ -1223,7 +1223,7 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_tsc_freq, "I", ""); + 0, sizeof(u_int), sysctl_machdep_tsc_freq, "IU", ""); static unsigned i8254_get_timecount(struct timecounter *tc) diff --git a/sys/i386/i386/tsc.c b/sys/i386/i386/tsc.c index 29c895834074..52e19325cdf0 100644 --- a/sys/i386/i386/tsc.c +++ b/sys/i386/i386/tsc.c @@ -1203,7 +1203,7 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, i8254_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_i8254_freq, "I", ""); + 0, sizeof(u_int), sysctl_machdep_i8254_freq, "IU", ""); static int sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) @@ -1223,7 +1223,7 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_tsc_freq, "I", ""); + 0, sizeof(u_int), sysctl_machdep_tsc_freq, "IU", ""); static unsigned i8254_get_timecount(struct timecounter *tc) diff --git a/sys/i386/isa/clock.c b/sys/i386/isa/clock.c index 29c895834074..52e19325cdf0 100644 --- a/sys/i386/isa/clock.c +++ b/sys/i386/isa/clock.c @@ -1203,7 +1203,7 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, i8254_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_i8254_freq, "I", ""); + 0, sizeof(u_int), sysctl_machdep_i8254_freq, "IU", ""); static int sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) @@ -1223,7 +1223,7 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_tsc_freq, "I", ""); + 0, sizeof(u_int), sysctl_machdep_tsc_freq, "IU", ""); static unsigned i8254_get_timecount(struct timecounter *tc) diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c index 29c895834074..52e19325cdf0 100644 --- a/sys/isa/atrtc.c +++ b/sys/isa/atrtc.c @@ -1203,7 +1203,7 @@ sysctl_machdep_i8254_freq(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, i8254_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_i8254_freq, "I", ""); + 0, sizeof(u_int), sysctl_machdep_i8254_freq, "IU", ""); static int sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) @@ -1223,7 +1223,7 @@ sysctl_machdep_tsc_freq(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_INT | CTLFLAG_RW, - 0, sizeof(u_int), sysctl_machdep_tsc_freq, "I", ""); + 0, sizeof(u_int), sysctl_machdep_tsc_freq, "IU", ""); static unsigned i8254_get_timecount(struct timecounter *tc)