summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremie Courreges-Anglas <jca@cvs.openbsd.org>2019-11-02 00:40:11 +0000
committerJeremie Courreges-Anglas <jca@cvs.openbsd.org>2019-11-02 00:40:11 +0000
commitaa4485ab3804c95da0f3dbba7e5e78c890248264 (patch)
tree77b09cc27864a8209e92aa1d9d390c4d7b42ae2c
parent2ec9c2d7f0bb1131c0952ff1f52e06f432cafc35 (diff)
Zap remnants from "cpu throttling on mp systems" introduced in rev 1.46
That logic is now in the kernel. ok kn@ mpi@
-rw-r--r--usr.sbin/apmd/apmd.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/usr.sbin/apmd/apmd.c b/usr.sbin/apmd/apmd.c
index a38958bbe01..a94356633db 100644
--- a/usr.sbin/apmd/apmd.c
+++ b/usr.sbin/apmd/apmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: apmd.c,v 1.89 2019/09/25 20:34:11 bluhm Exp $ */
+/* $OpenBSD: apmd.c,v 1.90 2019/11/02 00:40:10 jca Exp $ */
/*
* Copyright (c) 1995, 1996 John T. Kohl
@@ -36,7 +36,6 @@
#include <sys/wait.h>
#include <sys/event.h>
#include <sys/time.h>
-#include <sys/sched.h>
#include <sys/sysctl.h>
#include <stdarg.h>
#include <stdio.h>
@@ -67,9 +66,6 @@ void usage(void);
int power_status(int fd, int force, struct apm_power_info *pinfo);
int bind_socket(const char *sn);
enum apm_state handle_client(int sock_fd, int ctl_fd);
-int get_avg_idle_mp(int ncpu);
-int get_avg_idle_up(void);
-void perf_status(struct apm_power_info *pinfo, int ncpu);
void suspend(int ctl_fd);
void stand_by(int ctl_fd);
void hibernate(int ctl_fd);
@@ -389,9 +385,6 @@ main(int argc, char *argv[])
const char *errstr;
int kq, nchanges;
struct kevent ev[2];
- int ncpu_mib[2] = { CTL_HW, HW_NCPU };
- int ncpu;
- size_t ncpu_sz = sizeof(ncpu);
while ((ch = getopt(argc, argv, "aACdHLsf:t:S:z:Z:")) != -1)
switch(ch) {
@@ -504,9 +497,6 @@ main(int argc, char *argv[])
if (kevent(kq, ev, nchanges, NULL, 0, &sts) == -1)
error("kevent", NULL);
- if (sysctl(ncpu_mib, 2, &ncpu, &ncpu_sz, NULL, 0) == -1)
- error("cannot read hw.ncpu", NULL);
-
for (;;) {
int rv;