2005-03-08 05:25:21

by Shaohua Li

[permalink] [raw]
Subject: RE: [ACPI] s4bios: does anyone use it?

Hi,
>> >
>> > Is there single user of s4bios? It used to work for me 4 notebooks
>> > ago, but I never really used it.
>>
>> I don't have anymore my toshiba laptop where S4 bios was first
>> implemented.
>>
>> > I think I'm the only person that ever
>> > seen it working, but I could be wrong.
>>
>> You are indeed wrong.
>
>Okay, so we had 2 users in past but have 0 users now? :-).
I wonder how could anyone use S4BIOS in 2.6.11. S4 and S4b all came into
'enter_state'. and in acpi_sleep_init:

if (i == ACPI_STATE_S4) {
if (acpi_gbl_FACS->S4bios_f) {
sleep_states[i] = 1;
printk(" S4bios");
acpi_pm_ops.pm_disk_mode =
PM_DISK_FIRMWARE;
}
if (sleep_states[i])
acpi_pm_ops.pm_disk_mode =
PM_DISK_PLATFORM;
}
That means we actually can't set PM_DISK_FIRMWARE (always set
PM_DISK_PLATFORM). Is this intended? If no, .pm_disk_mode should be a
mask.

Thanks,
Shaohua


2005-03-08 09:19:23

by Pavel Machek

[permalink] [raw]
Subject: Re: [ACPI] s4bios: does anyone use it?

Hi!

> >Okay, so we had 2 users in past but have 0 users now? :-).
> I wonder how could anyone use S4BIOS in 2.6.11. S4 and S4b all came into
> 'enter_state'. and in acpi_sleep_init:
>
> if (i == ACPI_STATE_S4) {
> if (acpi_gbl_FACS->S4bios_f) {
> sleep_states[i] = 1;
> printk(" S4bios");
> acpi_pm_ops.pm_disk_mode =
> PM_DISK_FIRMWARE;
> }
> if (sleep_states[i])
> acpi_pm_ops.pm_disk_mode =
> PM_DISK_PLATFORM;
> }
> That means we actually can't set PM_DISK_FIRMWARE (always set
> PM_DISK_PLATFORM). Is this intended? If no, .pm_disk_mode should be a
> mask.

pm_disk_mode is settable using /sys/power/disk, no? Anyway, what about
this, then?

--- clean/Documentation/feature-removal-schedule.txt 2005-01-22 21:24:50.000000000 +0100
+++ linux/Documentation/feature-removal-schedule.txt 2005-03-08 10:18:05.000000000 +0100
@@ -15,3 +15,8 @@
against the LSB, and can be replaced by using udev.
Who: Greg Kroah-Hartman <[email protected]>

+What: ACPI S4bios support
+When: May 2005
+Why: Noone uses it, and it probably does not work, anyway. swsusp is
+ faster, more reliable, and people are actually using it.
+Who: Pavel Machek <[email protected]>


Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!

2005-03-08 09:42:38

by Stefan Seyfried

[permalink] [raw]
Subject: Re: [ACPI] s4bios: does anyone use it?

Pavel Machek wrote:
> Hi!
>
>> >Okay, so we had 2 users in past but have 0 users now? :-).
>> I wonder how could anyone use S4BIOS in 2.6.11. S4 and S4b all came into
>> 'enter_state'. and in acpi_sleep_init:
>>
>> if (i == ACPI_STATE_S4) {
>> if (acpi_gbl_FACS->S4bios_f) {
>> sleep_states[i] = 1;
>> printk(" S4bios");
>> acpi_pm_ops.pm_disk_mode =
>> PM_DISK_FIRMWARE;
>> }
>> if (sleep_states[i])
>> acpi_pm_ops.pm_disk_mode =
>> PM_DISK_PLATFORM;
>> }
>> That means we actually can't set PM_DISK_FIRMWARE (always set
>> PM_DISK_PLATFORM). Is this intended? If no, .pm_disk_mode should be a
>> mask.
>
> pm_disk_mode is settable using /sys/power/disk, no?

No, it isn't. That was my original point: you can write "firmware" into
it, but it has no effect. This probably was a side-effect of the "make
firmware mode not default" patch from a year ago.
But the real question is: what is firmware mode good for today? Is there
a single machine where firmware mode once worked, but swsusp does not
work today?

> Anyway, what about this, then?
>
> --- clean/Documentation/feature-removal-schedule.txt 2005-01-22 21:24:50.000000000 +0100
> +++ linux/Documentation/feature-removal-schedule.txt 2005-03-08 10:18:05.000000000 +0100

Fine with me. I think it cannot work since ~one year (when we changed
the default from "firmware if available" to "shutdown always", the code
piece cited above) and nobody complained until now, so it won't be
missed IMO.
--
Stefan Seyfried, QA / R&D Team Mobile Devices, SUSE LINUX N?rnberg.

"Any ideas, John?"
"Well, surrounding them's out."