initial perflevel.
ok deraadt@, phessler@, patrick@, jca@
-/* $OpenBSD: cpu.c,v 1.59 2023/10/24 13:20:09 claudio Exp $ */
+/* $OpenBSD: cpu.c,v 1.60 2024/06/11 15:44:55 kettenis Exp $ */
/* $NetBSD: cpu.c,v 1.56 2004/04/14 04:01:49 bsh Exp $ */
min = ot->ot_opp_hz_min;
max = ot->ot_opp_hz_max;
level_hz = clock_get_frequency(ci->ci_node, NULL);
+ if (level_hz < min)
+ level_hz = min;
+ if (level_hz > max)
+ level_hz = max;
level = howmany(100 * (level_hz - min), (max - min));
}
-/* $OpenBSD: cpu.c,v 1.118 2024/05/30 04:16:25 tb Exp $ */
+/* $OpenBSD: cpu.c,v 1.119 2024/06/11 15:44:55 kettenis Exp $ */
/*
* Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
min = ot->ot_opp_hz_min;
max = ot->ot_opp_hz_max;
level_hz = clock_get_frequency(ci->ci_node, NULL);
+ if (level_hz < min)
+ level_hz = min;
+ if (level_hz > max)
+ level_hz = max;
level = howmany(100 * (level_hz - min), (max - min));
}
-/* $OpenBSD: cpu.c,v 1.18 2024/01/26 16:59:47 kettenis Exp $ */
+/* $OpenBSD: cpu.c,v 1.19 2024/06/11 15:44:55 kettenis Exp $ */
/*
* Copyright (c) 2016 Dale Rahn <drahn@dalerahn.com>
min = ot->ot_opp_hz_min;
max = ot->ot_opp_hz_max;
level_hz = clock_get_frequency(ci->ci_node, NULL);
+ if (level_hz < min)
+ level_hz = min;
+ if (level_hz > max)
+ level_hz = max;
level = howmany(100 * (level_hz - min), (max - min));
}