mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] apm: make apm=power-off configurable like apm=realmode-power-off
@ 2008-05-07 13:55 Niels de Vos
  2008-05-07 14:46 ` Stephen Rothwell
  0 siblings, 1 reply; 3+ messages in thread
From: Niels de Vos @ 2008-05-07 13:55 UTC (permalink / raw)
  To: sfr, linux-laptop, linux-kernel; +Cc: niels.devos

On some systems (with broken BIOSes?) apm=power-off should be appended
as kernel parameter. apm=realmode-power-off is configurable during 
compile-time. apm=power-off should be configurable likewise.

On non-SMP systems apm=power-off is the default. For kernels with SMP
support it is not.

Signed-off-by: Niels de Vos <niels.devos@wincor-nixdorf.com>
--
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index bbcafaa..e051f38 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1457,6 +1457,16 @@ 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_POWER_OFF
+	bool "Power off on shutdown"
+	depends on APM && SMP
+	help
+	  Force a power off on shutdown. Needed for some buggy BIOSes. If you
+	  run an SMP kernel on a non-SMP system with APM, you try turning on
+	  this option if your system does not power-off properly.
+
+	  Note: this option is equivalent to apm=power-off on the cmdline.
+
 config APM_REAL_MODE_POWER_OFF
 	bool "Use real mode APM BIOS call to power off"
 	help
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index bf9290e..e3015da 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -385,7 +385,7 @@ static int bounce_interval __read_mostly = DEFAULT_BOUNCE_INTERVAL;
 static int debug __read_mostly;
 static int smp __read_mostly;
 static int apm_disabled = -1;
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) && !defined(CONFIG_APM_POWER_OFF)
 static int power_off;
 #else
 static int power_off = 1;

-- 
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] 3+ messages in thread

* Re: [PATCH] apm: make apm=power-off configurable like apm=realmode-power-off
  2008-05-07 13:55 [PATCH] apm: make apm=power-off configurable like apm=realmode-power-off Niels de Vos
@ 2008-05-07 14:46 ` Stephen Rothwell
       [not found]   ` <4821C581.8050409@wincor-nixdorf.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2008-05-07 14:46 UTC (permalink / raw)
  To: Niels de Vos; +Cc: linux-laptop, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 631 bytes --]

Hi Neils,

On Wed, 07 May 2008 15:55:09 +0200 Niels de Vos <niels.devos@wincor-nixdorf.com> wrote:
>
> On some systems (with broken BIOSes?) apm=power-off should be appended
> as kernel parameter. apm=realmode-power-off is configurable during 
> compile-time. apm=power-off should be configurable likewise.
> 
> On non-SMP systems apm=power-off is the default. For kernels with SMP
> support it is not.

We had a similar compile time option that we removed in 2.3.26pre1 in
favour of the kernel parameter ...

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] apm: make apm=power-off configurable like apm=realmode-power-off
       [not found]   ` <4821C581.8050409@wincor-nixdorf.com>
@ 2008-05-07 15:27     ` Stephen Rothwell
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Rothwell @ 2008-05-07 15:27 UTC (permalink / raw)
  To: Niels de Vos; +Cc: linux-laptop, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1032 bytes --]

On Wed, 07 May 2008 17:06:41 +0200 Niels de Vos <niels.devos@wincor-nixdorf.com> wrote:
>
> Stephen Rothwell wrote:
> > Hi Neils,
> > 
> > On Wed, 07 May 2008 15:55:09 +0200 Niels de Vos <niels.devos@wincor-nixdorf.com> wrote:
> >> On some systems (with broken BIOSes?) apm=power-off should be appended
> >> as kernel parameter. apm=realmode-power-off is configurable during 
> >> compile-time. apm=power-off should be configurable likewise.
> >>
> >> On non-SMP systems apm=power-off is the default. For kernels with SMP
> >> support it is not.
> > 
> > We had a similar compile time option that we removed in 2.3.26pre1 in
> > favour of the kernel parameter ...
> 
> Okay, but why not have both options like apm=realmode-power-off?

It was a long time ago ... and APM must be almost dead my now, surely? :-)

Maybe I just never got around to removing the compile time config of real
mode power off.

-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au
http://www.canb.auug.org.au/~sfr/

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-07 15:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-07 13:55 [PATCH] apm: make apm=power-off configurable like apm=realmode-power-off Niels de Vos
2008-05-07 14:46 ` Stephen Rothwell
     [not found]   ` <4821C581.8050409@wincor-nixdorf.com>
2008-05-07 15:27     ` Stephen Rothwell

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®