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 <bharrison@ironport.com>
Reviewed by:	phk
MFC after:	1 week
This commit is contained in:
Mark Peek 2002-06-22 16:30:18 +00:00
parent 1926d4aaad
commit 5e3939b59b
5 changed files with 10 additions and 10 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)

View File

@ -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)