- Print message about cpufreq and timecounter TSC

Approved by:	njl
MFC after:	1 day
This commit is contained in:
Marcus Alves Grando 2006-03-03 02:06:04 +00:00
parent eb2336ddb5
commit b4130b8ae0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=156228

View File

@ -222,6 +222,7 @@ cf_set_method(device_t dev, const struct cf_level *level, int priority)
struct cf_saved_freq *saved_freq, *curr_freq;
struct pcpu *pc;
int cpu_id, error, i;
static int once;
sc = device_get_softc(dev);
error = 0;
@ -233,8 +234,14 @@ cf_set_method(device_t dev, const struct cf_level *level, int priority)
* If it is, then return EBUSY and refuse to change the
* clock speed.
*/
if (strcmp(timecounter->tc_name, "TSC") == 0)
if (strcmp(timecounter->tc_name, "TSC") == 0) {
if (!once) {
printf("cpufreq: frequency change with timecounter"
" TSC not allowed, see cpufreq(4)\n");
once = 1;
}
return (EBUSY);
}
CF_MTX_LOCK(&sc->lock);