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
..
2016-10-06 10:49:01 -07:00
2014-04-18 11:40:33 +02:00
2015-10-28 19:09:17 +00:00
2016-11-07 18:15:21 +00:00
2016-09-09 11:41:13 +01:00
2016-11-07 18:15:21 +00:00
2014-11-05 09:03:25 +01:00
2016-07-27 11:16:05 -07:00
2016-03-04 18:19:17 +00:00
2016-09-08 11:04:13 +01:00
2016-06-27 16:31:25 +01:00
2016-09-08 12:53:00 +02:00
2016-10-06 10:49:01 -07:00
2015-05-19 15:27:42 +01:00
2016-11-07 18:15:21 +00:00
2014-11-28 10:24:59 +00:00
2016-10-03 08:58:35 -07:00
2015-10-12 17:46:36 +01:00
2014-07-10 11:06:00 +01:00
2016-08-25 18:00:29 +01:00
2016-11-07 18:15:21 +00:00
2016-09-09 11:42:27 +01:00