Yes, something like that should do... I'd prefer not to call ACPI functions from outside of drivers/acpi, but this could be cleaned later.
On 5/9/07, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > On Wednesday, 9 May 2007 15:34, Alexey Starikovskiy wrote: > > we needed to call pm_prepare() on boot kernel only to disable GPEs to > > resolve 7887. It will also blink the LEDs during the resume image > > load, but it's possible to live without it. > > If you drop call to pm_prepare(), we still need to disable GPEs, so > > they will not fire during image switch. So if we disable GPE in > > suspend() method of EC it will work as soon as there are no other so > > much active GPEs at boot time... > > Okay, I just wanted to clarify. > > In that case, I think, we should add a special callback to disable the GPEs > in the restore code path (before we restore the image). > > I also think that it would be sufficient if this callback only executed the > following loop: > > > status = acpi_hw_disable_all_gpes(); > if (ACPI_FAILURE(status)) { > return_ACPI_STATUS(status); > } > > and it should be called right before disable_nonboot_cpus(). > > Is that correct? > > Now, assumig that it's correct, we'll need a complementary callback to be > executed in the restore error code paths, right after enable_nonboot_cpus(), > to enable the GPEs if there's an error during the restore. I think it might > contain the following code: > > status = acpi_hw_enable_all_runtime_gpes(); > if (ACPI_FAILURE(status)) { > return_ACPI_STATUS(status); > } > > > Greetings, > Rafael > > > > On 5/9/07, Rafael J. Wysocki <[EMAIL PROTECTED]> wrote: > > > On Wednesday, 9 May 2007 13:59, Alexey Starikovskiy wrote: > > > > This patch will disable EC GPE, which seems to be major problem. > > > > > > Could you please explain to me why you think so? > > > > > > Greetings, > > > Rafael > > > > > > > > > -- > If you don't have the time to read, > you don't have the time or the tools to write. > - Stephen King > > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Suspend-devel mailing list Suspend-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/suspend-devel