* [PATCH] apm: Remove CONFIG_APM_REAL_MODE_POWER_OFF in favor of kernel parameter
@ 2008-11-19 14:18 Niels de Vos
2008-11-20 8:50 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Niels de Vos @ 2008-11-19 14:18 UTC (permalink / raw)
To: sfr, linux-laptop, linux-kernel
Remove CONFIG_APM_REAL_MODE_POWER_OFF like CONFIG_APM_POWER_OFF which
has been done for linux-2.2.14pre8 (http://lkml.org/lkml/1999/11/23/3).
Re-introducing CONFIG_APM_POWER_OFF got nack-ed. Stephen didn't bother
to remove CONFIG_APM_REAL_MODE_POWER_OFF, let's get rid of it now.
Reference: http://lkml.org/lkml/2008/5/7/97
Signed-off-by: Niels de Vos <niels.devos@wincor-nixdorf.com>
---
arch/x86/Kconfig | 7 -------
arch/x86/kernel/apm_32.c | 4 ----
2 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 93224b5..d0b9ef7 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1629,13 +1629,6 @@ config APM_ALLOW_INTS
many of the newer IBM Thinkpads. If you experience hangs when you
suspend, try setting this to Y. Otherwise, say N.
-config APM_REAL_MODE_POWER_OFF
- bool "Use real mode APM BIOS call to power off"
- help
- Use real mode APM BIOS calls to switch off the computer. This is
- a work-around for a number of buggy BIOSes. Switch this option on if
- your computer crashes instead of powering off properly.
-
endif # APM
source "arch/x86/kernel/cpu/cpufreq/Kconfig"
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index 5145a6e..3a26525 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -391,11 +391,7 @@ static int power_off;
#else
static int power_off = 1;
#endif
-#ifdef CONFIG_APM_REAL_MODE_POWER_OFF
-static int realmode_power_off = 1;
-#else
static int realmode_power_off;
-#endif
#ifdef CONFIG_APM_ALLOW_INTS
static int allow_ints = 1;
#else
--
WINCOR NIXDORF International GmbH
Sitz der Gesellschaft: Paderborn
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Stefan Auerbach, Dr. Jürgen Wunram
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193
Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.
This e-mail may contain confidential information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] apm: Remove CONFIG_APM_REAL_MODE_POWER_OFF in favor of kernel parameter
2008-11-19 14:18 [PATCH] apm: Remove CONFIG_APM_REAL_MODE_POWER_OFF in favor of kernel parameter Niels de Vos
@ 2008-11-20 8:50 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-11-20 8:50 UTC (permalink / raw)
To: Niels de Vos
Cc: sfr, linux-laptop, linux-kernel, Alan Cox, Thomas Gleixner,
H. Peter Anvin, Andrew Morton
* Niels de Vos <niels.devos@wincor-nixdorf.com> wrote:
> Remove CONFIG_APM_REAL_MODE_POWER_OFF like CONFIG_APM_POWER_OFF
> which has been done for linux-2.2.14pre8
> (http://lkml.org/lkml/1999/11/23/3).
>
> Re-introducing CONFIG_APM_POWER_OFF got nack-ed. Stephen didn't bother
> to remove CONFIG_APM_REAL_MODE_POWER_OFF, let's get rid of it now.
> Reference: http://lkml.org/lkml/2008/5/7/97
>
> Signed-off-by: Niels de Vos <niels.devos@wincor-nixdorf.com>
>
> ---
> arch/x86/Kconfig | 7 -------
> arch/x86/kernel/apm_32.c | 4 ----
> 2 files changed, 0 insertions(+), 11 deletions(-)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 93224b5..d0b9ef7 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -1629,13 +1629,6 @@ config APM_ALLOW_INTS
> many of the newer IBM Thinkpads. If you experience hangs when you
> suspend, try setting this to Y. Otherwise, say N.
>
> -config APM_REAL_MODE_POWER_OFF
> - bool "Use real mode APM BIOS call to power off"
> - help
> - Use real mode APM BIOS calls to switch off the computer. This is
> - a work-around for a number of buggy BIOSes. Switch this option on if
> - your computer crashes instead of powering off properly.
> -
> -#ifdef CONFIG_APM_REAL_MODE_POWER_OFF
> -static int realmode_power_off = 1;
> -#else
> static int realmode_power_off;
> -#endif
this might be an option for obsolete hardware, but still it has the
potential to help people - and they could depend on it. The proper way
to phase out the Kconfig feature would be to insert an obsoletion
warning that triggers in some form when
CONFIG_APM_REAL_MODE_POWER_OFF=y is enabled, and then remove the
config option in 1-2 years. (and keep the boot option of course)
even better we should have a transparent kernel-parameters framework
that would be a one-stop-shop for _both_ .config and boot-time flags.
Something like:
define_bootparam("realmode_power_off");
plus a way to define the help text - all in a single file and in a
single place.
Which would automatically be turned into a kconfig option, a boot
option and (optionally) a sysctl as well, during the kernel build.
We do have the CONFIG_CMDLINE facility in the latest kernels to inject
arbitrary boot parameters during the kernel build, but that does not
have any semantic dimensions and its opacity makes it fragile: there's
no facility that warns if an option is typoed, if an option goes away
or gets changed, there's no help text like we have when there's a
Kconfig entry, etc.
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-20 8:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-19 14:18 [PATCH] apm: Remove CONFIG_APM_REAL_MODE_POWER_OFF in favor of kernel parameter Niels de Vos
2008-11-20 8:50 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®