mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Niels de Vos <niels.devos@wincor-nixdorf.com>
To: sfr@canb.auug.org.au, linux-laptop@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: niels.devos@wincor-nixdorf.com
Subject: [PATCH] apm: make apm=power-off configurable like apm=realmode-power-off
Date: Wed, 07 May 2008 15:55:09 +0200	[thread overview]
Message-ID: <4821B4BD.9010402@wincor-nixdorf.com> (raw)

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.


             reply	other threads:[~2008-05-07 14:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-07 13:55 Niels de Vos [this message]
2008-05-07 14:46 ` Stephen Rothwell
     [not found]   ` <4821C581.8050409@wincor-nixdorf.com>
2008-05-07 15:27     ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4821B4BD.9010402@wincor-nixdorf.com \
    --to=niels.devos@wincor-nixdorf.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-laptop@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®