Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: frank.hofmann@tomtom.com (Frank Hofmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v5] ARM hibernation / suspend-to-disk (fwd)
Date: Mon, 13 Jun 2011 13:40:21 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.2.00.1106131334190.25153@localhost6.localdomain6> (raw)
In-Reply-To: <20110613122601.GC12325@n2100.arm.linux.org.uk>



On Mon, 13 Jun 2011, Russell King - ARM Linux wrote:

> On Mon, Jun 13, 2011 at 01:04:02PM +0100, Frank Hofmann wrote:
>>   To make it clear: IF AND ONLY IF your suspend(-to-ram) func looks like:
>>
>> 	ENTRY(acmeSoC_cpu_suspend)
>> 		stmfd	sp!, {r4-r12,lr}
>> 		ldr	r3, resume_mmu_done
>> 		bl	cpu_suspend
>> 	resume_mmu_done:
>> 		ldmfd	sp!, {r3-r12,pc}
>> 	ENDPROC(acmeSoC_cpu_suspend)
>
> Nothing has that - because you can't execute that ldmfd after the call
> to cpu_suspend returns.  I don't think you've understood what I said on
> that subject in the previous thread.
>

Sorry typo.

Missed the critical lines:

ENTRY(acmeSoC_cpu_suspend)
 	stmfd	sp!, {r3-r12,lr}
 	ldr	r3, =resume_mmu_done
 	[ load r1 with v:p, whichever way - either you or your caller ]

 	bl cpu_suspend

 	[ ... do whatever low power entry stuff ... ]

 	[ function effectively ENDS HERE ... ]

resume_mmu_done:
 	ldmfd	sp!, {r3-r12,pc}



That's the key bits. DO NOTHING OF RELEVANCE BEFORE cpu_suspend AND DO 
NOTHING APART FROM ENTERING LOW POWER AFTERWARDS.


I _have_ understood what you've said. cpu_suspend is not made for this 
purpose, and hence I'm not claiming it should be. The use of it to create 
the core state snapshot for hibernation is merely something that, right 
now, works _by accident_ (or sheer luck, if you want to say that) rather 
than by intent / design.

Since there _is no design_ for what should work / how it should work in 
this context, I'm leaving it as-is, merely stating the constraints. Roll 
your own if you need / want to.


Does that clarify ?


FrankH.

  reply	other threads:[~2011-06-13 12:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-13 12:04 [RFC PATCH v5] ARM hibernation / suspend-to-disk (fwd) Frank Hofmann
2011-06-13 12:26 ` Russell King - ARM Linux
2011-06-13 12:40   ` Frank Hofmann [this message]
2011-06-13 13:20   ` Frank Hofmann
2011-06-13 13:56     ` Dave Martin
2011-06-13 15:34       ` Frank Hofmann
2011-06-13 16:11         ` Frank Hofmann
2011-06-13 16:44     ` Russell King - ARM Linux
2011-06-15 13:35       ` Frank Hofmann
2011-06-16 21:31         ` Russell King - ARM Linux
2011-06-20 12:32           ` Frank Hofmann
2011-06-21 14:35             ` Russell King - ARM Linux
2011-06-29 14:52         ` Matthieu CASTET
2011-06-29 15:14           ` Frank Hofmann
2011-06-29 20:08             ` Will Deacon
2011-07-05 12:37         ` Matthieu CASTET
     [not found]           ` <2C577202CB5719438D4E9608C565CB2C01B69D7F@NL-EXC-07.intra.local>
2011-07-05 17:09             ` Matthieu CASTET
2011-09-30  7:48 ` Barry Song

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=alpine.DEB.2.00.1106131334190.25153@localhost6.localdomain6 \
    --to=frank.hofmann@tomtom.com \
    --cc=linux-arm-kernel@lists.infradead.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