From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH] sh: hibernation support
Date: Fri, 06 Mar 2009 09:53:50 +0000 [thread overview]
Message-ID: <aec7e5c30903060153w962ff3bjcda3f8a24ac0acb2@mail.gmail.com> (raw)
In-Reply-To: <20090306064156.27281.35572.sendpatchset@rx1.opensource.se>
[-- Attachment #1: Type: text/plain, Size: 721 bytes --]
On Fri, Mar 6, 2009 at 4:06 PM, Francesco VIRLINZI
<francesco.virlinzi@st.com> wrote:
> Hi Magnus
> I was looking your patch and I have few question.
Great! You should try in on some ST hardware as well. =)
> Is it also for sh4 with PMB? If so how are you managing the PMB?
> Moreover what about interrupt controller? This means after a resume from
> hibernation
> you could have a resumed device (and driver) but the interrupt controller
> has the right irq-line not initialized.
I have not tested with PMB. You are right about the interrupt
controller, but it works because swsusp resume boots up the system as
usual with an identical kernel. Look at the attached file for the
swsusp code flow...
Cheers,
/ magnus
[-- Attachment #2: pm.txt --]
[-- Type: text/plain, Size: 2338 bytes --]
CONFIG_HIBERNATE in 2.6.29
suspend operation
------------------
swsusp code arch code driver callbacks
hibernate(): [disk.c]
hibernation_snapshot()
hibernation_snapshot():
suspend_console()
device_suspend(PMSG_FREEZE) prepare(), freeze()
disable_nonboot_cpus()
create_image()
create_image():
arch_prepare_suspend() do nothing
local_irq_disable()
device_power_down(PMSG_FREEZE) freeze_noirq()
save_processor_state() save registers
swsusp_arch_suspend() call swsusp_save()
swsusp_save() [snapshot.c]
create hibernation image
create_image(): [disk.c]
restore_processor_state() restore registers
device_power_up(PMSG_THAW) thaw_noirq()
local_irq_enable()
hibernation_snapshot()
enable_nonboot_cpus()
device_resume(PMSG_THAW) thaw(), complete()
resume_console()
hibernate():
swsusp_write()
swsusp_free()
power_down()
power_down():
hibernation_platform_enter()
hibernation_platform_enter():
suspend_console()
device_suspend(PMSG_HIBERNATE) prepare(), poweroff()
disable_nonboot_cpus()
local_irq_disable()
device_power_down(PMSG_HIBERNATE) poweroff_noirq()
resume operation:
-----------------
swsusp code arch code driver callbacks
software_resume() [disk.c]
swsusp_check()
swsusp_read()
hibernation_restore()
hibernation_restore()
suspend_console()
device_suspend(PMSG_QUIESCE) prepare(), freeze()
disable_nonboot_cpus()
resume_target_kernel()
resume_target_kernel()
local_irq_disable()
device_power_down(PMSG_QUIESCE) freeze_noirq()
save_processor_state() save registers
restore_highmem()
swsusp_arch_resume() overwrite memory
[executing old image now, back in suspend path with in_suspend = 0]
create_image():
restore_processor_state() restore registers
device_power_up(PMSG_RESTORE) restore_noirq()
local_irq_enable()
hibernation_snapshot()
enable_nonboot_cpus()
device_resume(PMSG_RESTORE) restore(), complete()
resume_console()
hibernate():
swsusp_free()
next prev parent reply other threads:[~2009-03-06 9:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-06 6:41 [PATCH] sh: hibernation support Magnus Damm
2009-03-06 6:57 ` Paul Mundt
2009-03-06 7:06 ` Francesco VIRLINZI
2009-03-06 9:53 ` Magnus Damm [this message]
2009-03-06 10:05 ` Francesco VIRLINZI
2009-03-06 10:17 ` Francesco VIRLINZI
2009-03-06 17:29 ` Jean-Christophe PLAGNIOL-VILLARD
2009-03-07 6:12 ` Paul Mundt
2009-03-07 6:20 ` Paul Mundt
2009-03-09 9:12 ` Francesco VIRLINZI
2009-03-09 9:16 ` Magnus Damm
2009-03-09 9:27 ` Francesco VIRLINZI
2009-03-09 10:03 ` Francesco VIRLINZI
2009-03-09 10:57 ` Magnus Damm
2009-03-09 17:35 ` Paul Mundt
2009-03-10 13:19 ` Francesco VIRLINZI
2009-03-11 4:26 ` Magnus Damm
2009-03-11 6:50 ` Francesco VIRLINZI
2009-03-11 7:29 ` Magnus Damm
2009-03-11 13:20 ` Francesco VIRLINZI
2009-03-12 5:47 ` Magnus Damm
2009-03-12 8:54 ` Francesco VIRLINZI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aec7e5c30903060153w962ff3bjcda3f8a24ac0acb2@mail.gmail.com \
--to=magnus.damm@gmail.com \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox