Bug 6612
Summary: | S3: resume poweroff due to outstanding button event | ||
---|---|---|---|
Product: | ACPI | Reporter: | Henrique de Moraes Holschuh (hmh) |
Component: | Other | Assignee: | Arnaud Patard (apatard) |
Status: | CLOSED CODE_FIX | ||
Severity: | normal | CC: | acpi-bugzilla, apatard |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.6.16.13 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Bug Depends on: | 6634 | ||
Bug Blocks: | |||
Attachments: |
patch from Arnaud Patard: delete powerbutton event after resume from S3
Incremental patch using acpi_set_register instead of acpi_clear_event |
Description
Henrique de Moraes Holschuh
2006-05-24 14:52:18 UTC
Created attachment 8201 [details] patch from Arnaud Patard: delete powerbutton event after resume from S3 Patch and analysis by Arnaud Patard <apatard <at> mandriva.com>, posted to: http://article.gmane.org/gmane.linux.acpi.devel/17555 This is a downside in the patch. 'acpi_clear_event' isn't supposed to be called with interrupt disabled (it uses mutex). Can't the code be modifed to use a semasphore of some sort, so that it supresses the powerbutton event after the mutex is released? Reply to comment #2: Calling acpi_set_register() with ACPI_MTX_DO_NOT_LOCK instead of calling acpi_clear_event() would be better ? Yes, I agree acpi_set_register() is the right way. Created attachment 8223 [details]
Incremental patch using acpi_set_register instead of acpi_clear_event
This is an incremental version but I can send a full version if preferred :)
It's a bit nasty to use a global variable within ACPICA, acpi_gbl_fixed_event_info. While the patch in comment #6 treats the symptom, the proper fix is to enable acpi_clear_event() to be called from interrupt context. To do that, the semaphore that acpi_set_register() uses needs to be replaced by a spin-lock. Fixing that is the subject of bug #6634 Ok. So, we'll have to wait having a fix for the bug #6634 ? Or one may change the acpi_clear_event prototype to get a second argument (ACPI_MTX_DO_NOT_LOCK or ACPI_MTX_LOCK) (I admit that this change of prototype is a ugly workaround :/ ) ? ACPICA 20060608 replaced the mutex in acpi_set_register() with a spin-lock, so the original patch in comment #1 no longer needs to be modified. shipped in 2.6.17-git9, closed. |