From aa4485ab3804c95da0f3dbba7e5e78c890248264 Mon Sep 17 00:00:00 2001 From: Jeremie Courreges-Anglas Date: Sat, 2 Nov 2019 00:40:11 +0000 Subject: Zap remnants from "cpu throttling on mp systems" introduced in rev 1.46 That logic is now in the kernel. ok kn@ mpi@ --- usr.sbin/apmd/apmd.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'usr.sbin') 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 #include #include -#include #include #include #include @@ -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; -- cgit v1.2.3