Skip to contentSkip to conversation

Why don't we use _TTS method?

DISCUSSION Rafael J. Wysocki 4 participants 17 messages May 3, 2007 – May 4, 2007 ACPI

lore
Share & tools
lore
#0 lore raw

Hi,

I've got two questions regarding the implementation of the ACPI poweroff/sleep code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method, although the ACPI specification (ACPI 3.0b) says that this method should be used for intiating and finishing power transitions. Could you please tell me why we don't use it?

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(), acpi_leave_sleep_state() we manipulate GPEs quite extensively (we disable and enable them for a couple of times during a transition), although the specification doesn't tell anything about that explicitly. Could you please explain to me what the purpose of that is?

Greetings,
Rafael

Signature · 3 lines
If you don't have the time to read,
you don't have the time or the tools to write.
		- Stephen King
#1 lore raw

Hi!

Quoted 7 lines

I've got two questions regarding the implementation of the ACPI poweroff/sleep code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method, although the ACPI specification (ACPI 3.0b) says that this method should be used for intiating and finishing power transitions. Could you please tell me why we don't use it?

I guess we simply overlooked that :-(.

Quoted 5 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(), acpi_leave_sleep_state() we manipulate GPEs quite extensively (we disable and enable them for a couple of times during a transition), although the specification doesn't tell anything about that explicitly. Could you please explain to me what the purpose of that is?

We have had some notebooks auto-waking-up just after suspend. Perhaps those hacks are workarounds for that problem?
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw
In reply to Rafael J. Wysocki

Hi!

Quoted 7 lines

I've got two questions regarding the implementation of the ACPI poweroff/sleep code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method, although the ACPI specification (ACPI 3.0b) says that this method should be used for intiating and finishing power transitions. Could you please tell me why we don't use it?

I guess we simply overlooked that :-(.

Quoted 5 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(), acpi_leave_sleep_state() we manipulate GPEs quite extensively (we disable and enable them for a couple of times during a transition), although the specification doesn't tell anything about that explicitly. Could you please explain to me what the purpose of that is?

We have had some notebooks auto-waking-up just after suspend. Perhaps those hacks are workarounds for that problem?
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#3 lore raw

Hi,

Quoted 11 lines · Pavel Machek

Hi!

Quoted 7 lines

I've got two questions regarding the implementation of the ACPI poweroff/sleep code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method, although the ACPI specification (ACPI 3.0b) says that this method should be used for intiating and finishing power transitions. Could you please tell me why we don't use it?

I guess we simply overlooked that :-(.

Hmm, does it mean we should implement that?

Quoted 8 lines
Quoted 5 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(), acpi_leave_sleep_state() we manipulate GPEs quite extensively (we disable and enable them for a couple of times during a transition), although the specification doesn't tell anything about that explicitly. Could you please explain to me what the purpose of that is?

We have had some notebooks auto-waking-up just after suspend. Perhaps those hacks are workarounds for that problem?

Well, maybe, but if there's anyone who knows *exactly* why we do this and why it is done in these particular places, I would appreciate it very much if she or he could explain that to me.

Currently we're having problems with some boxes due to the code reordering that took place before 2.6.21 and I'm trying to figure out what the source of them is. In the process I've observed that the ACPI functions used by us in the hibernation and suspend code generally don't follow the specification and I'd like to understand if that's intentional and if so then why.

Also, I'd like to understand why the old code ordering seemed to work better than the current one, although the current one is closer to what the ACPI spec says (or so it seems).

Greetings,
Rafael

#4 lore raw
In reply to Pavel Machek

Hi,

Quoted 11 lines · Pavel Machek

Hi!

Quoted 7 lines

I've got two questions regarding the implementation of the ACPI poweroff/sleep code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method, although the ACPI specification (ACPI 3.0b) says that this method should be used for intiating and finishing power transitions. Could you please tell me why we don't use it?

I guess we simply overlooked that :-(.

Hmm, does it mean we should implement that?

Quoted 8 lines
Quoted 5 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(), acpi_leave_sleep_state() we manipulate GPEs quite extensively (we disable and enable them for a couple of times during a transition), although the specification doesn't tell anything about that explicitly. Could you please explain to me what the purpose of that is?

We have had some notebooks auto-waking-up just after suspend. Perhaps those hacks are workarounds for that problem?

Well, maybe, but if there's anyone who knows *exactly* why we do this and why it is done in these particular places, I would appreciate it very much if she or he could explain that to me.

Currently we're having problems with some boxes due to the code reordering that took place before 2.6.21 and I'm trying to figure out what the source of them is. In the process I've observed that the ACPI functions used by us in the hibernation and suspend code generally don't follow the specification and I'd like to understand if that's intentional and if so then why.

Also, I'd like to understand why the old code ordering seemed to work better than the current one, although the current one is closer to what the ACPI spec says (or so it seems).

Greetings,
Rafael

#5 lore raw
In reply to Rafael J. Wysocki
Quoted 10 lines

-----Original Message-----
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of Rafael J. Wysocki
Sent: Thursday, May 03, 2007 1:02 PM
To: ACPI Devel Maling List
Cc: pm list; Pavel Machek
Subject: Why don't we use _TTS method?

Quoted 7 lines

Hi,

I've got two questions regarding the implementation of the ACPI poweroff/sleep
code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method, although the

ACPI

Quoted 3 lines

specification (ACPI 3.0b) says that this method should be used for intiating
and finishing power transitions. Could you please tell me why we

don't

Quoted 2 lines

use it?

[Moore, Robert]

Probably because it's fairly new and it takes a long time for these things to appear in real machines. Also, needs to be supported in Windows before we ever see it in real machines.

Quoted 3 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(),
acpi_leave_sleep_state() we manipulate GPEs quite extensively (we

disable

Quoted 1 line

and enable them for a couple of times during a transition), although

the

Quoted 4 lines

specification doesn't tell anything about that explicitly. Could you please
explain to me what the purpose of that is?

[Moore, Robert]

There a wake GPEs and runtime GPEs that need to be managed separately. We want to make sure that only the "Wake" GPEs are enabled as we goto sleep.

Bob

Quoted 10 lines

Greetings,
Rafael

--
If you don't have the time to read,
you don't have the time or the tools to write.
- Stephen King
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi"

in

Quoted 2 lines

the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
In reply to Rafael J. Wysocki
Quoted 10 lines

-----Original Message-----
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of Rafael J. Wysocki
Sent: Thursday, May 03, 2007 1:02 PM
To: ACPI Devel Maling List
Cc: pm list; Pavel Machek
Subject: Why don't we use _TTS method?

Quoted 7 lines

Hi,

I've got two questions regarding the implementation of the ACPI poweroff/sleep
code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method, although the

ACPI

Quoted 3 lines

specification (ACPI 3.0b) says that this method should be used for intiating
and finishing power transitions. Could you please tell me why we

don't

Quoted 2 lines

use it?

[Moore, Robert]

Probably because it's fairly new and it takes a long time for these things to appear in real machines. Also, needs to be supported in Windows before we ever see it in real machines.

Quoted 3 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(),
acpi_leave_sleep_state() we manipulate GPEs quite extensively (we

disable

Quoted 1 line

and enable them for a couple of times during a transition), although

the

Quoted 4 lines

specification doesn't tell anything about that explicitly. Could you please
explain to me what the purpose of that is?

[Moore, Robert]

There a wake GPEs and runtime GPEs that need to be managed separately. We want to make sure that only the "Wake" GPEs are enabled as we goto sleep.

Bob

Quoted 10 lines

Greetings,
Rafael

--
If you don't have the time to read,
you don't have the time or the tools to write.
- Stephen King
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi"

in

Quoted 2 lines

the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#7 lore raw
Quoted 20 lines · Robert
Quoted 9 lines

-----Original Message-----
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of Rafael J. Wysocki
Sent: Thursday, May 03, 2007 1:02 PM
To: ACPI Devel Maling List
Cc: pm list; Pavel Machek
Subject: Why don't we use _TTS method?

Quoted 7 lines

Hi,

I've got two questions regarding the implementation of the ACPI poweroff/sleep
code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method, although the

ACPI

Quoted 3 lines

specification (ACPI 3.0b) says that this method should be used for intiating
and finishing power transitions. Could you please tell me why we

Quoted 8 lines

don't

Quoted 2 lines

use it?

[Moore, Robert]

Probably because it's fairly new and it takes a long time for these things to appear in real machines. Also, needs to be supported in Windows before we ever see it in real machines.

Hmm, it already was in the 3.0 spec from 2004, so it doesn't seem to be that new. Still, I'm not an expert ...

Quoted 10 lines
Quoted 3 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(),
acpi_leave_sleep_state() we manipulate GPEs quite extensively (we

disable

Quoted 1 line

and enable them for a couple of times during a transition), although

the

Quoted 4 lines

specification doesn't tell anything about that explicitly. Could you please
explain to me what the purpose of that is?

Quoted 5 lines

[Moore, Robert]

There a wake GPEs and runtime GPEs that need to be managed separately. We want to make sure that only the "Wake" GPEs are enabled as we goto sleep.

I understand that, but the runtime GPEs seem to be disabled before we call device drivers' .suspend() routines (ie. before the devices are placed in the appropriate Dx states) and that's the point I don't quite get. Is there a technical reason for doing it in this particular place?

Thanks a lot for your reply.

Greetings,
Rafael

#8 lore raw

Rafael,

code in prepare() and enter() is split as code with interrupts on and code with interrupts off.
thus it doesn't quite follow a spec in regards of driver suspend. Basically we need to either split it to smaller pieces or have hooks to control interrupts/driver suspend from this code.

Regards,
Alex.

Quoted 63 lines · Rafael J. Wysocki
Quoted 20 lines · Robert
Quoted 9 lines

-----Original Message-----
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of Rafael J. Wysocki
Sent: Thursday, May 03, 2007 1:02 PM
To: ACPI Devel Maling List
Cc: pm list; Pavel Machek
Subject: Why don't we use _TTS method?

Quoted 7 lines

Hi,

I've got two questions regarding the implementation of the ACPI poweroff/sleep
code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method, although the

ACPI

Quoted 3 lines

specification (ACPI 3.0b) says that this method should be used for intiating
and finishing power transitions. Could you please tell me why we

Quoted 8 lines

don't

Quoted 2 lines

use it?

[Moore, Robert]

Probably because it's fairly new and it takes a long time for these things to appear in real machines. Also, needs to be supported in Windows before we ever see it in real machines.

Hmm, it already was in the 3.0 spec from 2004, so it doesn't seem to be that new. Still, I'm not an expert ...

Quoted 10 lines
Quoted 3 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(),
acpi_leave_sleep_state() we manipulate GPEs quite extensively (we

disable

Quoted 1 line

and enable them for a couple of times during a transition), although

the

Quoted 4 lines

specification doesn't tell anything about that explicitly. Could you please
explain to me what the purpose of that is?

Quoted 5 lines

[Moore, Robert]

There a wake GPEs and runtime GPEs that need to be managed separately. We want to make sure that only the "Wake" GPEs are enabled as we goto sleep.

I understand that, but the runtime GPEs seem to be disabled before we call device drivers' .suspend() routines (ie. before the devices are placed in the appropriate Dx states) and that's the point I don't quite get. Is there a technical reason for doing it in this particular place?

Thanks a lot for your reply.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#9 lore raw

Hi Alexey,

Quoted 4 lines · Alexey Starikovskiy

Rafael,

code in prepare() and enter() is split as code with interrupts on and code with interrupts off.

I see. Still, the spec seems to suggest that _GTS should be executed with interrupts off, but we run it in the 'interrupts on' part of code. Isn't that wrong?

Quoted 1 line

thus it doesn't quite follow a spec in regards of driver suspend.

Yes.

Quoted 2 lines

Basically we need to either split it to smaller pieces or have hooks to control interrupts/driver suspend from this code.

I'd like to split it and I'd like to figure out *how* to do this. More precisely, I'd like to learn which part of acpi_pm_prepare() should be executed before device_suspend() and which part can be run after it. Analogously, I'd like to learn which part of acpi_pm_finish() needs to be run before device_resume() and which part can be (or should be) run after it.

Greetings,
Rafael

Quoted 66 lines · Rafael J. Wysocki
Quoted 63 lines · Robert
Quoted 20 lines
Quoted 9 lines

-----Original Message-----
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of Rafael J. Wysocki
Sent: Thursday, May 03, 2007 1:02 PM
To: ACPI Devel Maling List
Cc: pm list; Pavel Machek
Subject: Why don't we use _TTS method?

Quoted 7 lines

Hi,

I've got two questions regarding the implementation of the ACPI poweroff/sleep
code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method, although the

ACPI

Quoted 3 lines

specification (ACPI 3.0b) says that this method should be used for intiating
and finishing power transitions. Could you please tell me why we

Quoted 8 lines

don't

Quoted 2 lines

use it?

[Moore, Robert]

Probably because it's fairly new and it takes a long time for these things to appear in real machines. Also, needs to be supported in Windows before we ever see it in real machines.

Hmm, it already was in the 3.0 spec from 2004, so it doesn't seem to be that new. Still, I'm not an expert ...

Quoted 10 lines
Quoted 3 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(),
acpi_leave_sleep_state() we manipulate GPEs quite extensively (we

disable

Quoted 1 line

and enable them for a couple of times during a transition), although

the

Quoted 4 lines

specification doesn't tell anything about that explicitly. Could you please
explain to me what the purpose of that is?

Quoted 5 lines

[Moore, Robert]

There a wake GPEs and runtime GPEs that need to be managed separately. We want to make sure that only the "Wake" GPEs are enabled as we goto sleep.

I understand that, but the runtime GPEs seem to be disabled before we call device drivers' .suspend() routines (ie. before the devices are placed in the appropriate Dx states) and that's the point I don't quite get. Is there a technical reason for doing it in this particular place?

Thanks a lot for your reply.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
If you don't have the time to read,
you don't have the time or the tools to write.
		- Stephen King
#10 lore raw

"New" is of course relative. In the ACPI world, anything about ACPI 3.0 is still considered "new". Windows has yet to fully implement ACPI 2.0, let alone ACPI 3.0...

Please point me to where the "spec spec seems to suggest that _GTS should be executed with interrupts off", as I don't think it should.

In any case, the AML interpreter cannot be executed with interrupts off. There is way too much going on in that code.

Bob

Quoted 7 lines

-----Original Message-----
From: Rafael J. Wysocki [mailto:[email protected]]
Sent: Friday, May 04, 2007 1:51 AM
To: Alexey Starikovskiy
Cc: Moore, Robert; ACPI Devel Maling List; pm list; Pavel Machek
Subject: Re: Why don't we use _TTS method?

Quoted 6 lines

Hi Alexey,

Quoted 3 lines · Alexey Starikovskiy

Rafael,

code in prepare() and enter() is split as code with interrupts on

and

Quoted 3 lines
Quoted 1 line

code with interrupts off.

I see. Still, the spec seems to suggest that _GTS should be executed

with

Quoted 1 line

interrupts off, but we run it in the 'interrupts on' part of code.

Isn't

Quoted 11 lines

that
wrong?

Quoted 1 line

thus it doesn't quite follow a spec in regards of driver suspend.

Yes.

Quoted 2 lines

Basically we need to either split it to smaller pieces or have hooks to control interrupts/driver suspend from this code.

I'd like to split it and I'd like to figure out *how* to do this.

More

Quoted 3 lines

precisely, I'd like to learn which part of acpi_pm_prepare() should be executed before device_suspend() and which part can be run after it. Analogously, I'd like to learn which part of acpi_pm_finish() needs to

be

Quoted 21 lines

run before device_resume() and which part can be (or should be) run after it.

Greetings,
Rafael

Quoted 14 lines · Rafael J. Wysocki
Quoted 13 lines · Robert
Quoted 12 lines
Quoted 12 lines

-----Original Message-----
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of Rafael J. Wysocki
Sent: Thursday, May 03, 2007 1:02 PM
To: ACPI Devel Maling List
Cc: pm list; Pavel Machek
Subject: Why don't we use _TTS method?

Hi,

I've got two questions regarding the implementation of the

ACPI

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

poweroff/sleep
code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method,

although

Quoted 3 lines

the

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

ACPI

Quoted 1 line

specification (ACPI 3.0b) says that this method should be used

for

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

intiating
and finishing power transitions. Could you please tell me why

we

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

don't

Quoted 2 lines

use it?

[Moore, Robert]

Probably because it's fairly new and it takes a long time for

these

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

things to appear in real machines. Also, needs to be supported

in

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

Windows before we ever see it in real machines.

Hmm, it already was in the 3.0 spec from 2004, so it doesn't seem

to

Quoted 6 lines

be

Quoted 5 lines
Quoted 5 lines

that new. Still, I'm not an expert ...

Quoted 3 lines
Quoted 3 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(),
acpi_leave_sleep_state() we manipulate GPEs quite extensively

(we

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

disable

Quoted 1 line

and enable them for a couple of times during a transition),

although

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

the

Quoted 1 line

specification doesn't tell anything about that explicitly.

Could

Quoted 4 lines

you

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

please
explain to me what the purpose of that is?

Quoted 9 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

[Moore, Robert]

There a wake GPEs and runtime GPEs that need to be managed

separately.

Quoted 1 line
Quoted 1 line
Quoted 1 line

We want to make sure that only the "Wake" GPEs are enabled as we

goto

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

sleep.

I understand that, but the runtime GPEs seem to be disabled before

we

Quoted 2 lines

call

Quoted 1 line
Quoted 1 line

device drivers' .suspend() routines (ie. before the devices are

placed

Quoted 11 lines

in the

Quoted 1 line
Quoted 1 line

appropriate Dx states) and that's the point I don't quite get. Is

there a

Quoted 8 lines
Quoted 8 lines

technical reason for doing it in this particular place?

Thanks a lot for your reply.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe

linux-acpi"

Quoted 11 lines

in

Quoted 5 lines
Quoted 3 lines

the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
If you don't have the time to read,
you don't have the time or the tools to write.
- Stephen King

#11 lore raw
In reply to Rafael J. Wysocki

"New" is of course relative. In the ACPI world, anything about ACPI 3.0 is still considered "new". Windows has yet to fully implement ACPI 2.0, let alone ACPI 3.0...

Please point me to where the "spec spec seems to suggest that _GTS should be executed with interrupts off", as I don't think it should.

In any case, the AML interpreter cannot be executed with interrupts off. There is way too much going on in that code.

Bob

Quoted 7 lines

-----Original Message-----
From: Rafael J. Wysocki [mailto:[email protected]]
Sent: Friday, May 04, 2007 1:51 AM
To: Alexey Starikovskiy
Cc: Moore, Robert; ACPI Devel Maling List; pm list; Pavel Machek
Subject: Re: Why don't we use _TTS method?

Quoted 6 lines

Hi Alexey,

Quoted 3 lines · Alexey Starikovskiy

Rafael,

code in prepare() and enter() is split as code with interrupts on

and

Quoted 3 lines
Quoted 1 line

code with interrupts off.

I see. Still, the spec seems to suggest that _GTS should be executed

with

Quoted 1 line

interrupts off, but we run it in the 'interrupts on' part of code.

Isn't

Quoted 11 lines

that
wrong?

Quoted 1 line

thus it doesn't quite follow a spec in regards of driver suspend.

Yes.

Quoted 2 lines

Basically we need to either split it to smaller pieces or have hooks to control interrupts/driver suspend from this code.

I'd like to split it and I'd like to figure out *how* to do this.

More

Quoted 3 lines

precisely, I'd like to learn which part of acpi_pm_prepare() should be executed before device_suspend() and which part can be run after it. Analogously, I'd like to learn which part of acpi_pm_finish() needs to

be

Quoted 21 lines

run before device_resume() and which part can be (or should be) run after it.

Greetings,
Rafael

Quoted 14 lines · Rafael J. Wysocki
Quoted 13 lines · Robert
Quoted 12 lines
Quoted 12 lines

-----Original Message-----
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of Rafael J. Wysocki
Sent: Thursday, May 03, 2007 1:02 PM
To: ACPI Devel Maling List
Cc: pm list; Pavel Machek
Subject: Why don't we use _TTS method?

Hi,

I've got two questions regarding the implementation of the

ACPI

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

poweroff/sleep
code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method,

although

Quoted 3 lines

the

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

ACPI

Quoted 1 line

specification (ACPI 3.0b) says that this method should be used

for

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

intiating
and finishing power transitions. Could you please tell me why

we

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

don't

Quoted 2 lines

use it?

[Moore, Robert]

Probably because it's fairly new and it takes a long time for

these

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

things to appear in real machines. Also, needs to be supported

in

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

Windows before we ever see it in real machines.

Hmm, it already was in the 3.0 spec from 2004, so it doesn't seem

to

Quoted 6 lines

be

Quoted 5 lines
Quoted 5 lines

that new. Still, I'm not an expert ...

Quoted 3 lines
Quoted 3 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(),
acpi_leave_sleep_state() we manipulate GPEs quite extensively

(we

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

disable

Quoted 1 line

and enable them for a couple of times during a transition),

although

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

the

Quoted 1 line

specification doesn't tell anything about that explicitly.

Could

Quoted 4 lines

you

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

please
explain to me what the purpose of that is?

Quoted 9 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

[Moore, Robert]

There a wake GPEs and runtime GPEs that need to be managed

separately.

Quoted 1 line
Quoted 1 line
Quoted 1 line

We want to make sure that only the "Wake" GPEs are enabled as we

goto

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

sleep.

I understand that, but the runtime GPEs seem to be disabled before

we

Quoted 2 lines

call

Quoted 1 line
Quoted 1 line

device drivers' .suspend() routines (ie. before the devices are

placed

Quoted 11 lines

in the

Quoted 1 line
Quoted 1 line

appropriate Dx states) and that's the point I don't quite get. Is

there a

Quoted 8 lines
Quoted 8 lines

technical reason for doing it in this particular place?

Thanks a lot for your reply.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe

linux-acpi"

Quoted 11 lines

in

Quoted 5 lines
Quoted 3 lines

the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
If you don't have the time to read,
you don't have the time or the tools to write.
- Stephen King

#12 lore raw
Quoted 6 lines · Robert

"New" is of course relative. In the ACPI world, anything about ACPI 3.0 is still considered "new". Windows has yet to fully implement ACPI 2.0, let alone ACPI 3.0...

Please point me to where the "spec spec seems to suggest that _GTS should be executed with interrupts off", as I don't think it should.

The ACPI 2.0 specification, 7.3.3, says:

"OSPM will set the sleep enable (SLP_EN) bit in the PM1 control register immediately following the execution of the _GTS control method without performing any other physical I/O or allowing any interrupt servicing."

This is also clearly stated in Subsection 9.1.

Yet, according to the same specification, 9.1.6:

"7. OSPM executes the _GTS control method, passing an argument that indicates
the sleeping state to be entered (1, 2, 3, or 4 representing S1, S2, S3, and S4).
8. OSPM clears the WAK_STS in the PM1a_STS and PM1b_STS registers.
9. OSPM saves the local processor’s context to memory.
10. OSPM flushes caches (only if entering S1, S2 or S3).
11. OSPM sets GPE enable registers to ensure that all appropriate wake signals are armed.
12. If entering an S4 state using the S4BIOS mechanism, OSPM writes the S4BIOS_REQ value (from the FADT) to the SMI_CMD port. This passes control to the BIOS, which then transitions the platform into the S4BIOS state.
13. If not entering an S4BIOS state, then OSPM writes SLP_TYPa (from the associated sleeping object) with the SLP_ENa bit set to the PM1a_CNT register.
14. OSPM writes SLP_TYPb with the SLP_EN bit set to the PM1b_CNT register."

which kind of contradicts the previous requirement. Still, 8-14 look like things that should be done with interrupts off.

Quoted 2 lines

In any case, the AML interpreter cannot be executed with interrupts off. There is way too much going on in that code.

Well, perhaps we can execute _GTS immediately before switching interrupts off.

Greetings,
Rafael

Quoted 142 lines
Quoted 7 lines

-----Original Message-----
From: Rafael J. Wysocki [mailto:[email protected]]
Sent: Friday, May 04, 2007 1:51 AM
To: Alexey Starikovskiy
Cc: Moore, Robert; ACPI Devel Maling List; pm list; Pavel Machek
Subject: Re: Why don't we use _TTS method?

Quoted 6 lines

Hi Alexey,

Quoted 3 lines · Alexey Starikovskiy

Rafael,

code in prepare() and enter() is split as code with interrupts on

and

Quoted 3 lines
Quoted 1 line

code with interrupts off.

I see. Still, the spec seems to suggest that _GTS should be executed

with

Quoted 1 line

interrupts off, but we run it in the 'interrupts on' part of code.

Isn't

Quoted 11 lines

that
wrong?

Quoted 1 line

thus it doesn't quite follow a spec in regards of driver suspend.

Yes.

Quoted 2 lines

Basically we need to either split it to smaller pieces or have hooks to control interrupts/driver suspend from this code.

I'd like to split it and I'd like to figure out *how* to do this.

More

Quoted 3 lines

precisely, I'd like to learn which part of acpi_pm_prepare() should be executed before device_suspend() and which part can be run after it. Analogously, I'd like to learn which part of acpi_pm_finish() needs to

be

Quoted 21 lines

run before device_resume() and which part can be (or should be) run after it.

Greetings,
Rafael

Quoted 14 lines · Rafael J. Wysocki
Quoted 13 lines · Robert
Quoted 12 lines
Quoted 12 lines

-----Original Message-----
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of Rafael J. Wysocki
Sent: Thursday, May 03, 2007 1:02 PM
To: ACPI Devel Maling List
Cc: pm list; Pavel Machek
Subject: Why don't we use _TTS method?

Hi,

I've got two questions regarding the implementation of the

ACPI

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

poweroff/sleep
code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method,

although

Quoted 3 lines

the

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

ACPI

Quoted 1 line

specification (ACPI 3.0b) says that this method should be used

for

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

intiating
and finishing power transitions. Could you please tell me why

we

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

don't

Quoted 2 lines

use it?

[Moore, Robert]

Probably because it's fairly new and it takes a long time for

these

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

things to appear in real machines. Also, needs to be supported

in

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

Windows before we ever see it in real machines.

Hmm, it already was in the 3.0 spec from 2004, so it doesn't seem

to

Quoted 6 lines

be

Quoted 5 lines
Quoted 5 lines

that new. Still, I'm not an expert ...

Quoted 3 lines
Quoted 3 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(),
acpi_leave_sleep_state() we manipulate GPEs quite extensively

(we

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

disable

Quoted 1 line

and enable them for a couple of times during a transition),

although

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

the

Quoted 1 line

specification doesn't tell anything about that explicitly.

Could

Quoted 4 lines

you

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

please
explain to me what the purpose of that is?

Quoted 9 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

[Moore, Robert]

There a wake GPEs and runtime GPEs that need to be managed

separately.

Quoted 1 line
Quoted 1 line
Quoted 1 line

We want to make sure that only the "Wake" GPEs are enabled as we

goto

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

sleep.

I understand that, but the runtime GPEs seem to be disabled before

we

Quoted 2 lines

call

Quoted 1 line
Quoted 1 line

device drivers' .suspend() routines (ie. before the devices are

placed

Quoted 11 lines

in the

Quoted 1 line
Quoted 1 line

appropriate Dx states) and that's the point I don't quite get. Is

there a

Quoted 8 lines
Quoted 8 lines

technical reason for doing it in this particular place?

Thanks a lot for your reply.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe

linux-acpi"

Quoted 11 lines

in

Quoted 5 lines
Quoted 3 lines

the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
If you don't have the time to read,
you don't have the time or the tools to write.
- Stephen King

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 7 lines
If you don't have the time to read,
you don't have the time or the tools to write.
		- Stephen King
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#13 lore raw
In reply to Moore, Robert
Quoted 6 lines · Robert

"New" is of course relative. In the ACPI world, anything about ACPI 3.0 is still considered "new". Windows has yet to fully implement ACPI 2.0, let alone ACPI 3.0...

Please point me to where the "spec spec seems to suggest that _GTS should be executed with interrupts off", as I don't think it should.

The ACPI 2.0 specification, 7.3.3, says:

"OSPM will set the sleep enable (SLP_EN) bit in the PM1 control register immediately following the execution of the _GTS control method without performing any other physical I/O or allowing any interrupt servicing."

This is also clearly stated in Subsection 9.1.

Yet, according to the same specification, 9.1.6:

"7. OSPM executes the _GTS control method, passing an argument that indicates
the sleeping state to be entered (1, 2, 3, or 4 representing S1, S2, S3, and S4).
8. OSPM clears the WAK_STS in the PM1a_STS and PM1b_STS registers.
9. OSPM saves the local processor’s context to memory.
10. OSPM flushes caches (only if entering S1, S2 or S3).
11. OSPM sets GPE enable registers to ensure that all appropriate wake signals are armed.
12. If entering an S4 state using the S4BIOS mechanism, OSPM writes the S4BIOS_REQ value (from the FADT) to the SMI_CMD port. This passes control to the BIOS, which then transitions the platform into the S4BIOS state.
13. If not entering an S4BIOS state, then OSPM writes SLP_TYPa (from the associated sleeping object) with the SLP_ENa bit set to the PM1a_CNT register.
14. OSPM writes SLP_TYPb with the SLP_EN bit set to the PM1b_CNT register."

which kind of contradicts the previous requirement. Still, 8-14 look like things that should be done with interrupts off.

Quoted 2 lines

In any case, the AML interpreter cannot be executed with interrupts off. There is way too much going on in that code.

Well, perhaps we can execute _GTS immediately before switching interrupts off.

Greetings,
Rafael

Quoted 142 lines
Quoted 7 lines

-----Original Message-----
From: Rafael J. Wysocki [mailto:[email protected]]
Sent: Friday, May 04, 2007 1:51 AM
To: Alexey Starikovskiy
Cc: Moore, Robert; ACPI Devel Maling List; pm list; Pavel Machek
Subject: Re: Why don't we use _TTS method?

Quoted 6 lines

Hi Alexey,

Quoted 3 lines · Alexey Starikovskiy

Rafael,

code in prepare() and enter() is split as code with interrupts on

and

Quoted 3 lines
Quoted 1 line

code with interrupts off.

I see. Still, the spec seems to suggest that _GTS should be executed

with

Quoted 1 line

interrupts off, but we run it in the 'interrupts on' part of code.

Isn't

Quoted 11 lines

that
wrong?

Quoted 1 line

thus it doesn't quite follow a spec in regards of driver suspend.

Yes.

Quoted 2 lines

Basically we need to either split it to smaller pieces or have hooks to control interrupts/driver suspend from this code.

I'd like to split it and I'd like to figure out *how* to do this.

More

Quoted 3 lines

precisely, I'd like to learn which part of acpi_pm_prepare() should be executed before device_suspend() and which part can be run after it. Analogously, I'd like to learn which part of acpi_pm_finish() needs to

be

Quoted 21 lines

run before device_resume() and which part can be (or should be) run after it.

Greetings,
Rafael

Quoted 14 lines · Rafael J. Wysocki
Quoted 13 lines · Robert
Quoted 12 lines
Quoted 12 lines

-----Original Message-----
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of Rafael J. Wysocki
Sent: Thursday, May 03, 2007 1:02 PM
To: ACPI Devel Maling List
Cc: pm list; Pavel Machek
Subject: Why don't we use _TTS method?

Hi,

I've got two questions regarding the implementation of the

ACPI

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

poweroff/sleep
code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method,

although

Quoted 3 lines

the

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

ACPI

Quoted 1 line

specification (ACPI 3.0b) says that this method should be used

for

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

intiating
and finishing power transitions. Could you please tell me why

we

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

don't

Quoted 2 lines

use it?

[Moore, Robert]

Probably because it's fairly new and it takes a long time for

these

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

things to appear in real machines. Also, needs to be supported

in

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 1 line

Windows before we ever see it in real machines.

Hmm, it already was in the 3.0 spec from 2004, so it doesn't seem

to

Quoted 6 lines

be

Quoted 5 lines
Quoted 5 lines

that new. Still, I'm not an expert ...

Quoted 3 lines
Quoted 3 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(),
acpi_leave_sleep_state() we manipulate GPEs quite extensively

(we

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

disable

Quoted 1 line

and enable them for a couple of times during a transition),

although

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

the

Quoted 1 line

specification doesn't tell anything about that explicitly.

Could

Quoted 4 lines

you

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

please
explain to me what the purpose of that is?

Quoted 9 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

[Moore, Robert]

There a wake GPEs and runtime GPEs that need to be managed

separately.

Quoted 1 line
Quoted 1 line
Quoted 1 line

We want to make sure that only the "Wake" GPEs are enabled as we

goto

Quoted 3 lines
Quoted 3 lines
Quoted 1 line

sleep.

I understand that, but the runtime GPEs seem to be disabled before

we

Quoted 2 lines

call

Quoted 1 line
Quoted 1 line

device drivers' .suspend() routines (ie. before the devices are

placed

Quoted 11 lines

in the

Quoted 1 line
Quoted 1 line

appropriate Dx states) and that's the point I don't quite get. Is

there a

Quoted 8 lines
Quoted 8 lines

technical reason for doing it in this particular place?

Thanks a lot for your reply.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe

linux-acpi"

Quoted 11 lines

in

Quoted 5 lines
Quoted 3 lines

the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

--
If you don't have the time to read,
you don't have the time or the tools to write.
- Stephen King

-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
If you don't have the time to read,
you don't have the time or the tools to write.
		- Stephen King
#14 lore raw
In reply to Alexey Starikovskiy

Hi Alexey,

Quoted 4 lines · Alexey Starikovskiy

Rafael,

code in prepare() and enter() is split as code with interrupts on and code with interrupts off.

I see. Still, the spec seems to suggest that _GTS should be executed with interrupts off, but we run it in the 'interrupts on' part of code. Isn't that wrong?

Quoted 1 line

thus it doesn't quite follow a spec in regards of driver suspend.

Yes.

Quoted 2 lines

Basically we need to either split it to smaller pieces or have hooks to control interrupts/driver suspend from this code.

I'd like to split it and I'd like to figure out *how* to do this. More precisely, I'd like to learn which part of acpi_pm_prepare() should be executed before device_suspend() and which part can be run after it. Analogously, I'd like to learn which part of acpi_pm_finish() needs to be run before device_resume() and which part can be (or should be) run after it.

Greetings,
Rafael

Quoted 66 lines · Rafael J. Wysocki
Quoted 63 lines · Robert
Quoted 20 lines
Quoted 9 lines

-----Original Message-----
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of Rafael J. Wysocki
Sent: Thursday, May 03, 2007 1:02 PM
To: ACPI Devel Maling List
Cc: pm list; Pavel Machek
Subject: Why don't we use _TTS method?

Quoted 7 lines

Hi,

I've got two questions regarding the implementation of the ACPI poweroff/sleep
code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method, although the

ACPI

Quoted 3 lines

specification (ACPI 3.0b) says that this method should be used for intiating
and finishing power transitions. Could you please tell me why we

Quoted 8 lines

don't

Quoted 2 lines

use it?

[Moore, Robert]

Probably because it's fairly new and it takes a long time for these things to appear in real machines. Also, needs to be supported in Windows before we ever see it in real machines.

Hmm, it already was in the 3.0 spec from 2004, so it doesn't seem to be that new. Still, I'm not an expert ...

Quoted 10 lines
Quoted 3 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(),
acpi_leave_sleep_state() we manipulate GPEs quite extensively (we

disable

Quoted 1 line

and enable them for a couple of times during a transition), although

the

Quoted 4 lines

specification doesn't tell anything about that explicitly. Could you please
explain to me what the purpose of that is?

Quoted 5 lines

[Moore, Robert]

There a wake GPEs and runtime GPEs that need to be managed separately. We want to make sure that only the "Wake" GPEs are enabled as we goto sleep.

I understand that, but the runtime GPEs seem to be disabled before we call device drivers' .suspend() routines (ie. before the devices are placed in the appropriate Dx states) and that's the point I don't quite get. Is there a technical reason for doing it in this particular place?

Thanks a lot for your reply.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
If you don't have the time to read,
you don't have the time or the tools to write.
		- Stephen King
#15 lore raw
In reply to Rafael J. Wysocki

Rafael,

code in prepare() and enter() is split as code with interrupts on and code with interrupts off.
thus it doesn't quite follow a spec in regards of driver suspend. Basically we need to either split it to smaller pieces or have hooks to control interrupts/driver suspend from this code.

Regards,
Alex.

Quoted 63 lines · Rafael J. Wysocki
Quoted 20 lines · Robert
Quoted 9 lines

-----Original Message-----
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of Rafael J. Wysocki
Sent: Thursday, May 03, 2007 1:02 PM
To: ACPI Devel Maling List
Cc: pm list; Pavel Machek
Subject: Why don't we use _TTS method?

Quoted 7 lines

Hi,

I've got two questions regarding the implementation of the ACPI poweroff/sleep
code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method, although the

ACPI

Quoted 3 lines

specification (ACPI 3.0b) says that this method should be used for intiating
and finishing power transitions. Could you please tell me why we

Quoted 8 lines

don't

Quoted 2 lines

use it?

[Moore, Robert]

Probably because it's fairly new and it takes a long time for these things to appear in real machines. Also, needs to be supported in Windows before we ever see it in real machines.

Hmm, it already was in the 3.0 spec from 2004, so it doesn't seem to be that new. Still, I'm not an expert ...

Quoted 10 lines
Quoted 3 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(),
acpi_leave_sleep_state() we manipulate GPEs quite extensively (we

disable

Quoted 1 line

and enable them for a couple of times during a transition), although

the

Quoted 4 lines

specification doesn't tell anything about that explicitly. Could you please
explain to me what the purpose of that is?

Quoted 5 lines

[Moore, Robert]

There a wake GPEs and runtime GPEs that need to be managed separately. We want to make sure that only the "Wake" GPEs are enabled as we goto sleep.

I understand that, but the runtime GPEs seem to be disabled before we call device drivers' .suspend() routines (ie. before the devices are placed in the appropriate Dx states) and that's the point I don't quite get. Is there a technical reason for doing it in this particular place?

Thanks a lot for your reply.

Greetings,
Rafael
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#16 lore raw
In reply to Moore, Robert
Quoted 20 lines · Robert
Quoted 9 lines

-----Original Message-----
From: [email protected] [mailto:linux-acpi- [email protected]] On Behalf Of Rafael J. Wysocki
Sent: Thursday, May 03, 2007 1:02 PM
To: ACPI Devel Maling List
Cc: pm list; Pavel Machek
Subject: Why don't we use _TTS method?

Quoted 7 lines

Hi,

I've got two questions regarding the implementation of the ACPI poweroff/sleep
code in drivers/acpi/sleep and drivers/acpi/hardware .

1) We don't seem to use the _TTS system-control method, although the

ACPI

Quoted 3 lines

specification (ACPI 3.0b) says that this method should be used for intiating
and finishing power transitions. Could you please tell me why we

Quoted 8 lines

don't

Quoted 2 lines

use it?

[Moore, Robert]

Probably because it's fairly new and it takes a long time for these things to appear in real machines. Also, needs to be supported in Windows before we ever see it in real machines.

Hmm, it already was in the 3.0 spec from 2004, so it doesn't seem to be that new. Still, I'm not an expert ...

Quoted 10 lines
Quoted 3 lines

2) In the functions acpi_enter_sleep_state_prep(), acpi_enter_sleep_state(),
acpi_leave_sleep_state() we manipulate GPEs quite extensively (we

disable

Quoted 1 line

and enable them for a couple of times during a transition), although

the

Quoted 4 lines

specification doesn't tell anything about that explicitly. Could you please
explain to me what the purpose of that is?

Quoted 5 lines

[Moore, Robert]

There a wake GPEs and runtime GPEs that need to be managed separately. We want to make sure that only the "Wake" GPEs are enabled as we goto sleep.

I understand that, but the runtime GPEs seem to be disabled before we call device drivers' .suspend() routines (ie. before the devices are placed in the appropriate Dx states) and that's the point I don't quite get. Is there a technical reason for doing it in this particular place?

Thanks a lot for your reply.

Greetings,
Rafael