Re: x86: Increase PCIBIOS_MIN_IO to 0x1500 to fix nForce 4 suspend-to-RAM

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Robert Hancock <hancockr@...>
Cc: Linus Torvalds <torvalds@...>, Rafael J. Wysocki <rjw@...>, H. Peter Anvin <hpa@...>, Linux Kernel Mailing List <linux-kernel@...>, Greg KH <gregkh@...>, Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>, Len Brown <lenb@...>, Andrew Morton <akpm@...>, pm list <linux-pm@...>
Date: Monday, December 24, 2007 - 8:03 pm

On Monday 24 December 2007 22:40:46 Robert Hancock wrote:

That is from the 3.0 spec though. And it looks like the definition changed 
from pre-3.0 to 3.0 and above.

This is what the 1.0B spec says (and this is also repeated verbatim in 2.0, 
2.0a, 2.0b, and 2.0c):

"The _PTS control method is executed by the operating system at the beginning 
of the sleep process for S1, S2, S3, S4, and for orderly S5 shutdown. The 
sleeping state value (1, 2, 3, 4, or 5) is passed to the _PTS control method. 
Before the OS notifies native device drivers and prepares the system software 
for a system sleeping state, it executes this ACPI control method. Thus, this 
control method can be executed a relatively long time before actually 
entering the desired sleeping state. In addition, the OS can abort the 
sleeping operation without notification to the ACPI driver, in which case 
another _PTS would occur some time before the next attempt by the OS to enter 
a sleeping state. The _PTS control method cannot modify the current 
configuration or power state of any device in the system. For example, _PTS 
would simply store the sleep type in the embedded controller in sequencing 
the system into a sleep state when the SLP_EN bit is set."

According to the earlier versions of the ACPI spec, Linux is doing the wrong 
thing - we should call _PTS() before we start powerding down devices, or 
notifying device drivers to start suspending.

So, my limited understanding of what we currently do for ACPI suspend-to-RAM 
is:

1) Freeze processes/ devices
2) Put all devices into low power mode
3) Execute _PTS()
4) Suspend system

So the problem is - our current suspend order is fine for ACPI 3.0 and above, 
but for pre-3.0 systems, this violates the older specs, where 2) and 3) 
should be reversed.


No, it looks like the BIOS is obeying the older specs, and Linux is at fault 
here for breaking the suspend logic of pre ACPI 3.0 systems.

-Carlos
-- 
E-Mail: carlos@strangeworlds.co.uk
Web: strangeworlds.co.uk
GPG Key ID: 0x23EE722D
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: x86: Increase PCIBIOS_MIN_IO to 0x1500 to fix nForce 4 s..., Carlos Corbacho, (Mon Dec 24, 8:03 pm)
Re: x86: Increase PCIBIOS_MIN_IO to 0x1500 to fix nForce 4 s..., Rafael J. Wysocki, (Tue Dec 25, 9:26 am)
Re: x86: Increase PCIBIOS_MIN_IO to 0x1500 to fix nForce 4 s..., Rafael J. Wysocki, (Tue Dec 25, 2:26 pm)
Re: x86: Increase PCIBIOS_MIN_IO to 0x1500 to fix nForce 4 s..., Rafael J. Wysocki, (Tue Dec 25, 10:11 am)
Re: ACPI: _PTS ordering needs fixing for pre ACPI 3.0 syste..., Rafael J. Wysocki, (Tue Dec 25, 9:36 am)
Re: ACPI: _PTS ordering needs fixing for pre ACPI 3.0 syste..., Rafael J. Wysocki, (Tue Dec 25, 10:07 am)