linux/arch/arm64/mm
Mark Rutland 623b476fc8 arm64: move sp_el0 and tpidr_el1 into cpu_suspend_ctx
When returning from idle, we rely on the fact that thread_info lives at
the end of the kernel stack, and restore this by masking the saved stack
pointer. Subsequent patches will sever the relationship between the
stack and thread_info, and to cater for this we must save/restore sp_el0
explicitly, storing it in cpu_suspend_ctx.

As cpu_suspend_ctx must be doubleword aligned, this leaves us with an
extra slot in cpu_suspend_ctx. We can use this to save/restore tpidr_el1
in the same way, which simplifies the code, avoiding pointer chasing on
the restore path (as we no longer need to load thread_info::cpu followed
by the relevant slot in __per_cpu_offset based on this).

This patch stashes both registers in cpu_suspend_ctx.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Laura Abbott <labbott@redhat.com>
Cc: James Morse <james.morse@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2016-11-11 18:25:44 +00:00
..
cache.S arm64: mm: convert __dma_* routines to use start, size 2016-08-22 10:00:48 +01:00
context.c arm64: update ASID limit 2016-06-21 20:10:18 +01:00
copypage.c arm64: Defer dcache flush in __cpu_copy_user_page 2015-12-17 11:07:13 +00:00
dma-mapping.c arm64: Remove pointless WARN_ON in DMA teardown 2016-11-07 18:15:03 +00:00
dump.c arm64: dump: Add checking for writable and exectuable pages 2016-11-07 18:15:04 +00:00
extable.c arm64: migrate exception table users off module.h and onto extable.h 2016-09-20 09:36:21 +01:00
fault.c arm64: mm: Set PSTATE.PAN from the cpu_enable_pan() call 2016-10-20 09:50:53 +01:00
flush.c arm64: Add uprobe support 2016-11-07 18:15:21 +00:00
hugetlbpage.c arm64: hugetlb: fix the wrong address for several functions 2016-11-09 16:55:13 +00:00
init.c arm64: remove pr_cont abuse from mem_init 2016-10-20 15:27:56 +01:00
ioremap.c arm64: add ioremap physical address information 2015-01-23 15:29:06 +00:00
kasan_init.c arm64: kasan: Fix zero shadow mapping overriding kernel image shadow 2016-03-11 11:03:35 +00:00
Makefile arm64: dump: Make ptdump debugfs a separate option 2016-11-07 18:15:04 +00:00
mmap.c arm64: mm: remove unnecessary EXPORT_SYMBOL_GPL 2016-05-05 09:49:38 +01:00
mmu.c arm64: dump: Add checking for writable and exectuable pages 2016-11-07 18:15:04 +00:00
numa.c arm64/numa: fix incorrect log for memory-less node 2016-10-26 18:21:51 +01:00
pageattr.c arm64: hibernate: Support DEBUG_PAGEALLOC 2016-08-25 18:00:30 +01:00
pgd.c arm64: mm: drop fixup_init() and mm.h 2016-09-06 19:09:38 +01:00
proc.S arm64: move sp_el0 and tpidr_el1 into cpu_suspend_ctx 2016-11-11 18:25:44 +00:00
ptdump_debugfs.c arm64: dump: Make ptdump debugfs a separate option 2016-11-07 18:15:04 +00:00