mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Stefano Rivoir <s.rivoir@gts.it>
Cc: linux-kernel@vger.kernel.org, acpi-devel@lists.sourceforge.net
Subject: Re: 2.6.11-mm2
Date: Thu, 10 Mar 2005 00:09:21 -0800	[thread overview]
Message-ID: <20050310000921.0d0bd597.akpm@osdl.org> (raw)
In-Reply-To: <422FFDEF.2060706@gts.it>

Stefano Rivoir <s.rivoir@gts.it> wrote:
>
> Andrew Morton wrote:
> > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.11/2.6.11-mm2/
> 
> Hi Andrew
> 
> With 2.6.11-mm series, "acpi_poweroff called" problem is back again (it 
> disappeared in 2.6.11-rc-mm and actually never happend in Linus' tree). 
> So when you shutdown, you have to unplug power cord or so to switch off 
> because the system hangs after that message is displayed.
> 

Does the below fix it?

If so, sorry, this patch was dropped because it just does everything the
wrong way, and the acpi guys are cooking up some scheme to fix it for real.



From: "Marcos D. Marado Torres" <marado@student.dei.uc.pt>

From: "Barry K. Nathan" <barryn@pobox.com>

On Tue, Feb 08, 2005 at 08:54:06PM -0800, Andrew Morton wrote:
> "Marcos D. Marado Torres" <marado@student.dei.uc.pt> wrote:
> >
> > Please add to -mm the patch in attachment, since it solves the old
> >  acpi_power_off bug...
> 
> What acpi_power_off bug?  And how does it solve it?

Here's the observed bug that the patch is trying to fix:
http://bugme.osdl.org/show_bug.cgi?id=4041

What Marcos posted is a typo-corrected version of Eric Biederman's
patch:
http://marc.theaimsgroup.com/?l=linux-kernel&m=110665542929525&w=2

In Eric's own words, the patch "needs some work before it goes into a
mainline kernel". AFAICT it's more of a proof-of-concept, just to see if
Eric's on the right track...

This is the motivation behind the patch:
http://marc.theaimsgroup.com/?l=linux-kernel&m=110665405402747&w=2


Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/acpi/sleep/poweroff.c |   23 +++++++++++++++++++++--
 25-akpm/drivers/base/power/shutdown.c |    7 +++++++
 2 files changed, 28 insertions(+), 2 deletions(-)

diff -puN drivers/acpi/sleep/poweroff.c~acpi_power_off-bug-fix drivers/acpi/sleep/poweroff.c
--- 25/drivers/acpi/sleep/poweroff.c~acpi_power_off-bug-fix	2005-02-23 01:48:08.000000000 -0800
+++ 25-akpm/drivers/acpi/sleep/poweroff.c	2005-02-23 01:48:08.000000000 -0800
@@ -7,18 +7,37 @@
 
 #include <linux/pm.h>
 #include <linux/init.h>
+#include <linux/kernel.h>
 #include <acpi/acpi_bus.h>
 #include <linux/sched.h>
 #include "sleep.h"
 
 static void
+acpi_power_off_prepare(void)
+{
+       if (system_state == SYSTEM_POWER_OFF) {
+               acpi_wakeup_gpe_poweroff_prepare();
+               acpi_enter_sleep_state_prep(ACPI_STATE_S5);
+       }
+}
+
+void
+do_acpi_power_off_prepare(void)
+{
+       if (!acpi_disabled) {
+               acpi_power_off_prepare();
+       }
+}
+
+
+static void
 acpi_power_off (void)
 {
 	printk("%s called\n",__FUNCTION__);
+#if 0	/* This should be made redundant by other patches.. */
 	/* Some SMP machines only can poweroff in boot CPU */
 	set_cpus_allowed(current, cpumask_of_cpu(0));
-	acpi_wakeup_gpe_poweroff_prepare();
-	acpi_enter_sleep_state_prep(ACPI_STATE_S5);
+#endif
 	ACPI_DISABLE_IRQS();
 	acpi_enter_sleep_state(ACPI_STATE_S5);
 }
diff -puN drivers/base/power/shutdown.c~acpi_power_off-bug-fix drivers/base/power/shutdown.c
--- 25/drivers/base/power/shutdown.c~acpi_power_off-bug-fix	2005-02-23 01:48:08.000000000 -0800
+++ 25-akpm/drivers/base/power/shutdown.c	2005-02-23 01:48:08.000000000 -0800
@@ -62,6 +62,13 @@ void device_shutdown(void)
 	}
 	up_write(&devices_subsys.rwsem);
 
+#ifdef CONFIG_ACPI
+	{
+		extern void do_acpi_power_off_prepare(void);
+		do_acpi_power_off_prepare();
+	}
+#endif
+
 	sysdev_shutdown();
 }
 
_


  reply	other threads:[~2005-03-10  8:10 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-08 11:38 2.6.11-mm2 Andrew Morton
2005-03-08 13:58 ` 2.6.11-mm2 Paul Mundt
2005-03-08 19:40   ` 2.6.11-mm2 Andrew Morton
2005-03-08 16:00 ` 2.6.11-mm2 (compile stats) John Cherry
2005-03-08 18:54 ` 2.6.11-mm2 fremap.c compile error Jurriaan
2005-03-11 22:50   ` Adrian Bunk
2005-03-08 19:29 ` inconsistent kallsyms data [2.6.11-mm2] Dominik Brodowski
2005-03-08 20:35   ` Andrew Morton
2005-03-08 20:45     ` Dominik Brodowski
2005-03-09 12:57       ` Paulo Marques
2005-03-09 20:16         ` Paulo Marques
2005-03-10 12:12           ` Paulo Marques
2005-03-13  8:54             ` Sam Ravnborg
2005-03-14 13:33               ` Paulo Marques
2005-03-14 22:17               ` Dominik Brodowski
2005-03-14 22:14             ` Dominik Brodowski
2005-03-08 23:20 ` 2.6.11-mm2 Christoph Hellwig
2005-03-08 23:29   ` 2.6.11-mm2 Andrew Morton
2005-03-08 23:36 ` 2.6.11-mm2 J.A. Magallon
2005-03-08 23:44   ` 2.6.11-mm2 Robert Love
2005-03-08 23:51     ` 2.6.11-mm2 J.A. Magallon
2005-03-09  0:02       ` 2.6.11-mm2 Robert Love
2005-03-09  0:16 ` 2.6.11-mm2 Adrian Bunk
2005-03-09  0:53   ` 2.6.11-mm2 Andrew Morton
2005-03-09  1:39     ` 2.6.11-mm2 Jeff Garzik
2005-03-09  0:20 ` 2.6.11-mm2 Adrian Bunk
2005-03-09  1:50   ` 2.6.11-mm2 Karsten Keil
2005-03-10  7:57 ` 2.6.11-mm2 Stefano Rivoir
2005-03-10  8:09   ` Andrew Morton [this message]
2005-03-21 23:45   ` 2.6.11-mm2 Andrew Morton

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=20050310000921.0d0bd597.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=acpi-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=s.rivoir@gts.it \
    /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®