Module Name:    src
Committed By:   dsl
Date:           Sun Sep 30 21:36:20 UTC 2012

Modified Files:
        src/sys/arch/i386/conf: ALL GENERIC
        src/sys/dev/apm: apm.c apmbios.h files.apm
        src/sys/dev/hpc/apm: apmdev.c

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.344 -r1.345 src/sys/arch/i386/conf/ALL
cvs rdiff -u -r1.1080 -r1.1081 src/sys/arch/i386/conf/GENERIC
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/apm/apm.c
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/apm/apmbios.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/apm/files.apm
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/hpc/apm/apmdev.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/i386/conf/ALL
diff -u src/sys/arch/i386/conf/ALL:1.344 src/sys/arch/i386/conf/ALL:1.345
--- src/sys/arch/i386/conf/ALL:1.344	Sun Sep 23 01:03:39 2012
+++ src/sys/arch/i386/conf/ALL	Sun Sep 30 21:36:18 2012
@@ -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 @@ include 	"arch/i386/conf/std.i386"
 
 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 @@ p64h2apic* at pci? dev? function?	# P64H
 #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

Index: src/sys/arch/i386/conf/GENERIC
diff -u src/sys/arch/i386/conf/GENERIC:1.1080 src/sys/arch/i386/conf/GENERIC:1.1081
--- src/sys/arch/i386/conf/GENERIC:1.1080	Sun Sep 23 01:05:21 2012
+++ src/sys/arch/i386/conf/GENERIC	Sun Sep 30 21:36:18 2012
@@ -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 @@ include 	"arch/i386/conf/std.i386"
 
 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 @@ config		netbsd	root on ? type ?
 #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

Index: src/sys/dev/apm/apm.c
diff -u src/sys/dev/apm/apm.c:1.27 src/sys/dev/apm/apm.c:1.28
--- src/sys/dev/apm/apm.c:1.27	Sun Jul 17 20:54:50 2011
+++ src/sys/dev/apm/apm.c	Sun Sep 30 21:36:19 2012
@@ -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 @@ const struct cdevsw apm_cdevsw = {
 };
 
 /* 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 @@ int	apm_v12_enabled = 0;
 #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 @@ apm_set_ver(struct apm_softc *sc)
 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

Index: src/sys/dev/apm/apmbios.h
diff -u src/sys/dev/apm/apmbios.h:1.6 src/sys/dev/apm/apmbios.h:1.7
--- src/sys/dev/apm/apmbios.h:1.6	Sun Sep 30 21:05:14 2012
+++ src/sys/dev/apm/apmbios.h	Sun Sep 30 21:36:20 2012
@@ -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

Index: src/sys/dev/apm/files.apm
diff -u src/sys/dev/apm/files.apm:1.3 src/sys/dev/apm/files.apm:1.4
--- src/sys/dev/apm/files.apm:1.3	Sat Jul  8 20:22:19 2006
+++ src/sys/dev/apm/files.apm	Sun Sep 30 21:36:20 2012
@@ -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

Index: src/sys/dev/hpc/apm/apmdev.c
diff -u src/sys/dev/hpc/apm/apmdev.c:1.25 src/sys/dev/hpc/apm/apmdev.c:1.26
--- src/sys/dev/hpc/apm/apmdev.c:1.25	Sun Jul 17 20:54:51 2011
+++ src/sys/dev/hpc/apm/apmdev.c	Sun Sep 30 21:36:20 2012
@@ -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 @@ const struct cdevsw apmdev_cdevsw = {
 
 /* 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 @@ apm_set_ver(struct apm_softc *sc)
 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)");

Reply via email to