From: Len Brown <lenb@kernel.org>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-acpi@vger.kernel.org,
pm list <linux-pm@lists.linux-foundation.org>,
linux-kernel@vger.kernel.org, Len Brown <len.brown@intel.com>,
Matthew Garrett <mjg@redhat.com>
Subject: Re: [PATCH] acpi: Fall back to manually changing SCI_EN
Date: Wed, 28 Apr 2010 20:22:25 -0400 (EDT) [thread overview]
Message-ID: <alpine.LFD.2.00.1004282019240.2598@sony> (raw)
In-Reply-To: <201004282058.20910.rjw@sisk.pl>
On Wed, 28 Apr 2010, Rafael J. Wysocki wrote:
> On Monday 19 April 2010, Matthew Garrett wrote:
> > The ACPI spec tells us that the ACPI SCI_EN bit is under hardware control
> > and shouldn't be touched by the OS. It seems that the Leading Other OS
> > ignores this and some machines expect this behaviour. We have a blacklist
> > for these, but given that we're able to detect the failure case and the
> > alternative to breaking the spec is letting the machine crash and burn,
> > let's try falling back when we know the alternative is a mostly-dead
> > machine.
> >
> > Signed-off-by: Matthew Garrett <mjg@redhat.com>
>
> I guess we can try that, but I'd prefer it if that went into .35.
>
> It _should_ be safe, but ...
>
> Anyway, Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
I'd like to push this patch in .34,
and in .35 remove the DMI list and the boot option.
One thing that has bothered me about the boot option
is that it writes SCI_EN instead of callin acpi_enable()
as opposed to in-addition-to acpi_enable().
If all acpi_enable() did was set SCI_EN, then it would
not make a difference. However, acpi_enable() writes
SMI_CMD and we really have no idea what other stuff
the BIOS may do in SMM on this transition.
So if we don't end up reverting this one,
I'd really like to see the boot option gone in .35.
thanks,
Len Brown, Intel Open Source Technology Center
-
> > ---
> > drivers/acpi/sleep.c | 16 +++++++++++++---
> > 1 files changed, 13 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
> > index f74834a..79df8d4 100644
> > --- a/drivers/acpi/sleep.c
> > +++ b/drivers/acpi/sleep.c
> > @@ -227,6 +227,7 @@ static int acpi_suspend_begin(suspend_state_t pm_state)
> > static int acpi_suspend_enter(suspend_state_t pm_state)
> > {
> > acpi_status status = AE_OK;
> > + acpi_status enable_status = AE_OK;
> > unsigned long flags = 0;
> > u32 acpi_state = acpi_target_sleep_state;
> >
> > @@ -254,10 +255,19 @@ static int acpi_suspend_enter(suspend_state_t pm_state)
> > }
> >
> > /* If ACPI is not enabled by the BIOS, we need to enable it here. */
> > - if (set_sci_en_on_resume)
> > + if (!set_sci_en_on_resume)
> > + enable_status = acpi_enable();
> > +
> > + if (set_sci_en_on_resume || enable_status == AE_NO_HARDWARE_RESPONSE)
> > + /* If we're still in legacy mode then we have a problem. The
> > + * spec tells us that this bit is under hardware control, but
> > + * there's no plausible way that the OS can transition back to
> > + * legacy mode so our choices here are to either ignore the
> > + * spec or crash and burn horribly. The latter doesn't seem
> > + * like it's ever going to be the preferable choice, so let's
> > + * live dangerously.
> > + */
> > acpi_write_bit_register(ACPI_BITREG_SCI_ENABLE, 1);
> > - else
> > - acpi_enable();
> >
> > /* Reprogram control registers and execute _BFS */
> > acpi_leave_sleep_state_prep(acpi_state);
> --
next prev parent reply other threads:[~2010-04-29 0:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1271711614-15527-1-git-send-email-mjg@redhat.com>
2010-04-28 18:58 ` [PATCH] acpi: Fall back to manually changing SCI_EN Rafael J. Wysocki
[not found] ` <201004282058.20910.rjw@sisk.pl>
2010-04-29 0:22 ` Len Brown [this message]
2010-04-29 21:05 ` Rafael J. Wysocki
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=alpine.LFD.2.00.1004282019240.2598@sony \
--to=lenb@kernel.org \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=mjg@redhat.com \
--cc=rjw@sisk.pl \
/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