diff options
author | Frederic Cambus <fcambus@cvs.openbsd.org> | 2016-12-16 12:01:20 +0000 |
---|---|---|
committer | Frederic Cambus <fcambus@cvs.openbsd.org> | 2016-12-16 12:01:20 +0000 |
commit | 6bade498f41f004b1c6117009109ca8b4c5118c6 (patch) | |
tree | 59ceabdaa9481ce1fc180305a87239ea265cde28 /sys/arch/loongson | |
parent | 1b34fdf084109293655997cfbd74bda39b4cbd07 (diff) |
Provide the "machdep.lidsuspend" sysctl on Loongson.
OK visa@
Diffstat (limited to 'sys/arch/loongson')
-rw-r--r-- | sys/arch/loongson/loongson/machdep.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/arch/loongson/loongson/machdep.c b/sys/arch/loongson/loongson/machdep.c index 55fd7183960..9560a53e68e 100644 --- a/sys/arch/loongson/loongson/machdep.c +++ b/sys/arch/loongson/loongson/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.69 2016/12/11 07:57:14 visa Exp $ */ +/* $OpenBSD: machdep.c,v 1.70 2016/12/16 12:01:19 fcambus Exp $ */ /* * Copyright (c) 2009, 2010, 2014 Miodrag Vallat. @@ -116,6 +116,7 @@ int physmem; /* Max supported memory, changes to actual. */ int ncpu = 1; /* At least one CPU in the system. */ int nnodes = 1; /* Number of NUMA nodes, only on 3A. */ struct user *proc0paddr; +int lid_suspend = 1; const struct platform *sys_platform; struct cpu_hwinfo bootcpu_hwinfo; @@ -1016,6 +1017,8 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) return ENOTDIR; /* Overloaded */ switch (name[0]) { + case CPU_LIDSUSPEND: + return sysctl_int(oldp, oldlenp, newp, newlen, &lid_suspend); default: return EOPNOTSUPP; } |