linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] ARM: mm: add L2 suspend/resume support
@ 2011-09-26 14:32 Lorenzo Pieralisi
  2011-09-26 14:32 ` [RFC PATCH 1/3] ARM: mm: add outercache resume hook Lorenzo Pieralisi
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Lorenzo Pieralisi @ 2011-09-26 14:32 UTC (permalink / raw)
  To: linux-arm-kernel

As a follow up to the last L2 resume patch on alkml:

http://www.spinics.net/lists/arm-kernel/msg141881.html

please have a look at this patchset and merge the required bits if needed,
in particular MMU off for L2 retention use case.

Description:

In order to support the deepest C-states on all ARM platforms, code to resume
L2 state could be added to the kernel to avoid reliance on bootloaders.

If L2 RAM is retained on power down, it is not cleaned on shutdown to preserve
its content and improve performance. Hence, L2 state should be restored before
the MMU is turned on, so that CPU resume code can search the data saved on
power down in the L2 cache.

This patch addresses this issue and extends outercache and l2x0 driver to
support L2 resume in a platform independent way, security issues 
notwithstanding that must be tackled separately.

Since the L2 should be enabled when the MMU is possibly off,
L2 physical address should be passed from platform code or retrieved from 
the device tree so that the code can be made generic and platform
independent. For that purpose, the signature of L2 init function has
to be upgraded.

The resume code should not use the stack and it must fetch data using 
program counter relative loads so that it does not matter if it is run 
in physical or virtual address space.

This patch depends on three patches:

ARM: 7090/1: CACHE-L2X0: filter start address can be 0 and is often 0
http://www.spinics.net/lists/arm-kernel/msg140126.html
available in rmk/for-next commit 2afda86d91b5f15a744182d7ddacf68f6a6054c9

ARM: 7080/1: l2x0: make sure I&D are not locked down on init
http://www.spinics.net/lists/arm-kernel/msg139119.html
available in rmk/for-next commit bac7e6ecf60933b68af910eb4c83a775a8b20b19

ARM: 7009/1: l2x0: Add OF based initialization
http://www.spinics.net/lists/arm-kernel/msg131123.htm
available in rmk/for-next commit 41c86ff5be44e26978282f86c20598181b999142

Platform code initializing L2 has not been patched (l2x0_init requires
a new parameter which is the physical base address) yet, waiting to
see if there are platforms that can take advantage of this code.

Tested on Samsung Origen within suspend and cpuidle code paths.
DT support compile tested.

Lorenzo Pieralisi (3):
  ARM: mm: add outercache resume hook
  ARM: mm: add l2x0 physical address parameter to init
  ARM: mm: add l2x0 suspend/resume support

 arch/arm/include/asm/hardware/cache-l2x0.h |   24 +++++-
 arch/arm/include/asm/outercache.h          |    7 ++
 arch/arm/kernel/asm-offsets.c              |   12 +++
 arch/arm/mm/Makefile                       |    3 +
 arch/arm/mm/cache-l2x0.c                   |   17 +++-
 arch/arm/mm/l2x0-sleep.S                   |  136 ++++++++++++++++++++++++++++
 6 files changed, 193 insertions(+), 6 deletions(-)
 create mode 100644 arch/arm/mm/l2x0-sleep.S

-- 
1.7.4.4

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2011-09-29  5:38 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-26 14:32 [RFC PATCH 0/3] ARM: mm: add L2 suspend/resume support Lorenzo Pieralisi
2011-09-26 14:32 ` [RFC PATCH 1/3] ARM: mm: add outercache resume hook Lorenzo Pieralisi
2011-09-26 14:32 ` [RFC PATCH 2/3] ARM: mm: add l2x0 physical address parameter to init Lorenzo Pieralisi
2011-09-26 14:51   ` Russell King - ARM Linux
2011-09-26 16:02     ` Lorenzo Pieralisi
2011-09-26 14:32 ` [RFC PATCH 3/3] ARM: mm: add l2x0 suspend/resume support Lorenzo Pieralisi
2011-09-26 14:55   ` Russell King - ARM Linux
2011-09-26 16:27     ` Lorenzo Pieralisi
2011-09-26 15:06   ` Russell King - ARM Linux
2011-09-26 17:14     ` Lorenzo Pieralisi
2011-09-27  5:29       ` Santosh Shilimkar
2011-09-27 10:28         ` Lorenzo Pieralisi
2011-09-27 10:57           ` Santosh Shilimkar
2011-09-28 19:24             ` Russell King - ARM Linux
2011-09-29  5:38               ` Santosh Shilimkar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).