public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Willy Tarreau <willy-tRhHnHjXm5DYtjvyW6yDsg@public.gmane.org>
To: len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Cc: marcelo.tosatti-3EexvZdKGZQ39yzSjRtAkw@public.gmane.org,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH] fix ACPI poweroff in 2.4.25-rc2
Date: Sun, 15 Feb 2004 11:40:16 +0100	[thread overview]
Message-ID: <20040215104016.GA22576@alpha.home.local> (raw)

Hi Len,

based on your suggestions, I've read several bug reports about poweroff
problems. I discovered that some people had to pass "nolapic" to make it
operational. I tried the same on my VAIO and it worked. I also found that
other people had to call the old acpi_suspend(ACPI_STATE_S5) code instead
of the new one in acpi_power_off().

So I compared acpi_suspend() with the new code, and noticed that acpi_suspend()
calls acpi_system_save_state() before doing acpi_enter_sleep_state_prep(). This
function is responsible for sending PM events to all system devices, it seems.
Thus, I inserted this call in acpi_poweroff() and it now works (on the VAIO
at least). Does it make sense ? I have yet to test it on other systems, but
if people with poweroff problems could try this patch on top of 2.4.25-rc2,
it would be interesting. Perhaps it could get its way into mainline before
2.4.25 ? Please note that with this one, it's no longer necessary to use
"nolapic" on the command line (for my notebook at least).

Regards,
Willy

--- linux-2.4.25-rc2/drivers/acpi/system.c	Wed Nov 19 15:31:22 2003
+++ linux-2.4.25-rc2-acpi/drivers/acpi/system.c	Sun Feb 15 11:38:17 2004
@@ -95,6 +95,7 @@
 {
 	if (unlikely(in_interrupt())) 
 		BUG();
+	acpi_system_save_state(ACPI_STATE_S5);
 	acpi_enter_sleep_state_prep(ACPI_STATE_S5);
 	ACPI_DISABLE_IRQS();
 	acpi_enter_sleep_state(ACPI_STATE_S5);



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

                 reply	other threads:[~2004-02-15 10:40 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20040215104016.GA22576@alpha.home.local \
    --to=willy-trhhnhjxm5dytjvyw6ydsg@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=marcelo.tosatti-3EexvZdKGZQ39yzSjRtAkw@public.gmane.org \
    /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