From: Ducrot Bruno <ducrot@poupinou.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: Andrew Grover <andrew.grover@intel.com>,
ACPI mailing list <acpi-devel@lists.sourceforge.net>,
kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [ACPI] S4bios support for 2.5.63
Date: Thu, 27 Feb 2003 15:13:22 +0100 [thread overview]
Message-ID: <20030227141322.GV13404@poup.poupinou.org> (raw)
In-Reply-To: <20030226211347.GA14903@elf.ucw.cz>
On Wed, Feb 26, 2003 at 10:13:47PM +0100, Pavel Machek wrote:
> Hi!
>
> This is S4bios support for 2.5.63. I'd like to see it in since it is
> easier to understand and more foolproof. Please apply,
>
> Pavel
> +/******************************************************************************
> + *
> + * FUNCTION: acpi_enter_sleep_state_s4bios
> + *
> + * PARAMETERS: None
> + *
> + * RETURN: Status
> + *
> + * DESCRIPTION: Perform a s4 bios request.
> + * THIS FUNCTION MUST BE CALLED WITH INTERRUPTS DISABLED
> + *
> + ******************************************************************************/
> +
> +acpi_status
> +acpi_enter_sleep_state_s4bios (
> + void)
> +{
> + u32 in_value;
> + acpi_status status;
> +
> +
> + ACPI_FUNCTION_TRACE ("Acpi_enter_sleep_state_s4bios");
> +
> + acpi_set_register (ACPI_BITREG_WAKE_STATUS, 1, ACPI_MTX_LOCK);
> + acpi_hw_clear_acpi_status();
> +
> + acpi_hw_disable_non_wakeup_gpes();
> +
> + ACPI_FLUSH_CPU_CACHE();
> +
> + status = acpi_os_write_port (acpi_gbl_FADT->smi_cmd, (acpi_integer) acpi_gbl_FADT->S4bios_req, 8);
> +
> + do {
> + acpi_os_stall(1000);
> + status = acpi_get_register (ACPI_BITREG_WAKE_STATUS, &in_value, ACPI_MTX_LOCK);
Please use ACPI_MTX_DO_NOT_LOCK flags.
1- all others user land are no more scheduled, and irqs are disabled.
2- the saved memory image is the one that appar 'randomly' when the suspension
happen, it is then possible that that we enter acpi_get_register()
3- acpi_get_register() touch one semaphore (a mutex) if you pass ACPI_MTX_LOCK,
then it is possible that this mutex is not released:
we are supposed to go to 'ret_point' in arch/i386/kernel/acpi/wakeup.S
4- after resuming, any try to acquire this mutex will deadlock (this will happen early
in acpi_leave_sleep_state()).
Cheers,
--
Ducrot Bruno
-- Which is worse: ignorance or apathy?
-- Don't know. Don't care.
next prev parent reply other threads:[~2003-02-27 14:03 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-26 21:13 Pavel Machek
2003-02-27 14:13 ` Ducrot Bruno [this message]
2003-03-04 13:23 ` [ACPI] " Pavel Machek
2003-03-04 12:00 ` Ducrot Bruno
2003-03-02 13:31 ` bert hubert
2003-03-02 18:44 ` Nigel Cunningham
2003-03-02 20:21 ` bert hubert
2003-03-02 22:22 ` Alan Cox
2003-03-03 0:39 ` Roger Luethi
2003-03-03 2:08 ` [ACPI] " Nigel Cunningham
2003-03-03 11:31 ` bert hubert
2003-03-03 12:17 ` Roger Luethi
2003-03-03 12:23 ` Pavel Machek
2003-03-03 12:35 ` bert hubert
2003-03-03 12:41 ` Pavel Machek
[not found] ` <1046700474.3782.197.camel@localhost>
2003-03-03 14:30 ` Roger Luethi
2003-03-03 22:06 ` Nigel Cunningham
2003-03-03 23:39 ` Roger Luethi
2003-03-04 0:36 ` Nigel Cunningham
2003-03-04 10:43 ` Roger Luethi
2003-03-04 9:12 ` bert hubert
2003-03-03 15:11 ` bert hubert
2003-03-03 16:40 ` Alan Cox
2003-03-03 16:23 ` P. Christeas
2003-03-03 16:28 ` bert hubert
2003-03-03 14:25 ` Alan Cox
2003-03-03 12:37 ` Roger Luethi
2003-03-03 14:09 ` Alan Cox
2003-03-03 14:37 ` [ACPI] " Ducrot Bruno
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=20030227141322.GV13404@poup.poupinou.org \
--to=ducrot@poupinou.org \
--cc=acpi-devel@lists.sourceforge.net \
--cc=andrew.grover@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pavel@ucw.cz \
/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®