Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys Remove code from dev/apm/apm.c for setting global variab...
details: https://anonhg.NetBSD.org/src/rev/138330994736
branches: trunk
changeset: 781791:138330994736
user: dsl <dsl%NetBSD.org@localhost>
date: Sun Sep 30 21:36:18 2012 +0000
description:
Remove code from dev/apm/apm.c for setting global variables to parameterise
the i386 bios apm code (now removed).
Remove the same code from the clone dev/hpc/apm/apmdev.c
Remove some not-used options from dev/apm/files.apm and the commented out
lines in ALL and GENERIC.
Maybe the APM_V10_ONLY and APM_NO_V12 could also be shot, but they are
further entwined in the code.
diffstat:
sys/arch/i386/conf/ALL | 5 ++---
sys/arch/i386/conf/GENERIC | 5 ++---
sys/dev/apm/apm.c | 43 ++-----------------------------------------
sys/dev/apm/apmbios.h | 10 +---------
sys/dev/apm/files.apm | 8 +++-----
sys/dev/hpc/apm/apmdev.c | 26 ++------------------------
6 files changed, 12 insertions(+), 85 deletions(-)
diffs (235 lines):
diff -r 9479453eb9d1 -r 138330994736 sys/arch/i386/conf/ALL
--- a/sys/arch/i386/conf/ALL Sun Sep 30 21:26:57 2012 +0000
+++ b/sys/arch/i386/conf/ALL Sun Sep 30 21:36:18 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.344 2012/09/23 01:03:39 chs Exp $
+# $NetBSD: ALL,v 1.345 2012/09/30 21:36:18 dsl Exp $
# From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
#
# ALL machine description file
@@ -17,7 +17,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "ALL-$Revision: 1.344 $"
+#ident "ALL-$Revision: 1.345 $"
maxusers 64 # estimated number of users
@@ -327,7 +327,6 @@
#apm0 at mainbus0 # Advanced power management
# Tuning for power management, see apm(4) for more details.
-#options APM_NO_IDLE # Don't call BIOS CPU idle function
#options APM_V10_ONLY # Use only the APM 1.0 calls
#options APM_NO_POWEROFF # Don't power off on halt(8)
#options APM_POWER_PRINT # Print stats on the console
diff -r 9479453eb9d1 -r 138330994736 sys/arch/i386/conf/GENERIC
--- a/sys/arch/i386/conf/GENERIC Sun Sep 30 21:26:57 2012 +0000
+++ b/sys/arch/i386/conf/GENERIC Sun Sep 30 21:36:18 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.1080 2012/09/23 01:05:21 chs Exp $
+# $NetBSD: GENERIC,v 1.1081 2012/09/30 21:36:18 dsl Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.1080 $"
+#ident "GENERIC-$Revision: 1.1081 $"
maxusers 64 # estimated number of users
@@ -312,7 +312,6 @@
#apm0 at mainbus0 # Advanced power management
# Tuning for power management, see apm(4) for more details.
-#options APM_NO_IDLE # Don't call BIOS CPU idle function
#options APM_V10_ONLY # Use only the APM 1.0 calls
#options APM_NO_POWEROFF # Don't power off on halt(8)
#options APM_POWER_PRINT # Print stats on the console
diff -r 9479453eb9d1 -r 138330994736 sys/dev/apm/apm.c
--- a/sys/dev/apm/apm.c Sun Sep 30 21:26:57 2012 +0000
+++ b/sys/dev/apm/apm.c Sun Sep 30 21:36:18 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apm.c,v 1.27 2011/07/17 20:54:50 joerg Exp $ */
+/* $NetBSD: apm.c,v 1.28 2012/09/30 21:36:19 dsl Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -33,14 +33,10 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.27 2011/07/17 20:54:50 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.28 2012/09/30 21:36:19 dsl Exp $");
#include "opt_apm.h"
-#ifdef APM_NOIDLE
-#error APM_NOIDLE option deprecated; use APM_NO_IDLE instead
-#endif
-
#if defined(DEBUG) && !defined(APMDEBUG)
#define APMDEBUG
#endif
@@ -123,17 +119,6 @@
};
/* configurable variables */
-int apm_bogus_bios = 0;
-#ifdef APM_DISABLE
-int apm_enabled = 0;
-#else
-int apm_enabled = 1;
-#endif
-#ifdef APM_NO_IDLE
-int apm_do_idle = 0;
-#else
-int apm_do_idle = 1;
-#endif
#ifdef APM_NO_STANDBY
int apm_do_standby = 0;
#else
@@ -149,16 +134,6 @@
#else
int apm_v12_enabled = 1;
#endif
-#ifdef APM_FORCE_64K_SEGMENTS
-int apm_force_64k_segments = 1;
-#else
-int apm_force_64k_segments = 0;
-#endif
-#ifdef APM_ALLOW_BOGUS_SEGMENTS
-int apm_allow_bogus_segments = 1;
-#else
-int apm_allow_bogus_segments = 0;
-#endif
/* variables used during operation (XXX cgd) */
u_char apm_majver, apm_minver;
@@ -597,20 +572,6 @@
ok:
aprint_normal("Power Management spec V%d.%d", apm_majver, apm_minver);
apm_inited = 1;
- if (sc->sc_detail & APM_IDLE_SLOWS) {
-#ifdef DIAGNOSTIC
- /* not relevant often */
- aprint_normal(" (slowidle)");
-#endif
- /* leave apm_do_idle at its user-configured setting */
- } else
- apm_do_idle = 0;
-#ifdef DIAGNOSTIC
- if (sc->sc_detail & APM_BIOS_PM_DISABLED)
- aprint_normal(" (BIOS mgmt disabled)");
- if (sc->sc_detail & APM_BIOS_PM_DISENGAGED)
- aprint_normal(" (BIOS managing devices)");
-#endif
}
int
diff -r 9479453eb9d1 -r 138330994736 sys/dev/apm/apmbios.h
--- a/sys/dev/apm/apmbios.h Sun Sep 30 21:26:57 2012 +0000
+++ b/sys/dev/apm/apmbios.h Sun Sep 30 21:36:18 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apmbios.h,v 1.6 2012/09/30 21:05:14 dsl Exp $ */
+/* $NetBSD: apmbios.h,v 1.7 2012/09/30 21:36:20 dsl Exp $ */
/*-
* Copyright (c) 1995 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -109,14 +109,6 @@
#define APM_MAJOR_VERS(info) (((info)&0xff00)>>8)
#define APM_MINOR_VERS(info) ((info)&0xff)
-#define APM_CPUIDLE_SLOW 0x04
-#define APM_DISABLED 0x08
-#define APM_DISENGAGED 0x10
-
-#define APM_IDLE_SLOWS (APM_CPUIDLE_SLOW << 16)
-#define APM_BIOS_PM_DISABLED (APM_DISABLED << 16)
-#define APM_BIOS_PM_DISENGAGED (APM_DISENGAGED << 16)
-
#define APMDEBUG_INFO 0x01
#define APMDEBUG_EVENTS 0x04
#define APMDEBUG_DEVICE 0x20
diff -r 9479453eb9d1 -r 138330994736 sys/dev/apm/files.apm
--- a/sys/dev/apm/files.apm Sun Sep 30 21:26:57 2012 +0000
+++ b/sys/dev/apm/files.apm Sun Sep 30 21:36:18 2012 +0000
@@ -1,12 +1,10 @@
-# $NetBSD: files.apm,v 1.3 2006/07/08 20:22:19 christos Exp $
+# $NetBSD: files.apm,v 1.4 2012/09/30 21:36:20 dsl Exp $
#
# Common APM support files
#
-defflag opt_apm.h APM_DISABLE APM_FORCE_64K_SEGMENTS APM_NO_IDLE
- APM_NO_STANDBY APM_V10_ONLY APM_NO_V12 APMDEBUG
- APM_POWER_PRINT APM_ALLOW_BOGUS_SEGMENTS
- APM_USE_KVM86
+defflag opt_apm.h APM_V10_ONLY APM_NO_V12 APMDEBUG
+ APM_POWER_PRINT
defparam opt_apm.h APMDEBUG_VALUE APM_DISABLE_INTERRUPTS
device apm
file dev/apm/apm.c apm
diff -r 9479453eb9d1 -r 138330994736 sys/dev/hpc/apm/apmdev.c
--- a/sys/dev/hpc/apm/apmdev.c Sun Sep 30 21:26:57 2012 +0000
+++ b/sys/dev/hpc/apm/apmdev.c Sun Sep 30 21:36:18 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: apmdev.c,v 1.25 2011/07/17 20:54:51 joerg Exp $ */
+/* $NetBSD: apmdev.c,v 1.26 2012/09/30 21:36:20 dsl Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -33,16 +33,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apmdev.c,v 1.25 2011/07/17 20:54:51 joerg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apmdev.c,v 1.26 2012/09/30 21:36:20 dsl Exp $");
#ifdef _KERNEL_OPT
#include "opt_apm.h"
#endif
-#ifdef APM_NOIDLE
-#error APM_NOIDLE option deprecated; use APM_NO_IDLE instead
-#endif
-
#if defined(DEBUG) && !defined(APMDEBUG)
#define APMDEBUG
#endif
@@ -132,16 +128,6 @@
/* configurable variables */
int apm_bogus_bios = 0;
-#ifdef APM_DISABLE
-int apm_enabled = 0;
-#else
-int apm_enabled = 1;
-#endif
-#ifdef APM_NO_IDLE
-int apm_do_idle = 0;
-#else
-int apm_do_idle = 1;
-#endif
#ifdef APM_NO_STANDBY
int apm_do_standby = 0;
#else
@@ -598,14 +584,6 @@
ok:
aprint_normal("Power Management spec V%d.%d", apm_majver, apm_minver);
apm_inited = 1;
- if (sc->sc_detail & APM_IDLE_SLOWS) {
-#ifdef DIAGNOSTIC
- /* not relevant often */
- aprint_normal(" (slowidle)");
-#endif
- /* leave apm_do_idle at its user-configured setting */
- } else
- apm_do_idle = 0;
#ifdef DIAGNOSTIC
if (sc->sc_detail & APM_BIOS_PM_DISABLED)
aprint_normal(" (BIOS mgmt disabled)");
Home |
Main Index |
Thread Index |
Old Index