arm64: entry.S: move SError handling into a C function for future expansion
authorXie XiuQi <xiexiuqi@huawei.com>
Thu, 2 Nov 2017 12:12:42 +0000 (12:12 +0000)
committerHaibo Chen <haibo.chen@nxp.com>
Thu, 12 Apr 2018 10:46:05 +0000 (18:46 +0800)
commit6efedc1df9e1449518b897cbc09d9b1b3a03bdda
tree4263f4f12035c5613b9bf93b3e50357e918e7351
parent3f2e0eb0e83a92c942ac44f796e6bcc610deea59
arm64: entry.S: move SError handling into a C function for future expansion

commit a92d4d1454ab upstream.

Today SError is taken using the inv_entry macro that ends up in
bad_mode.

SError can be used by the RAS Extensions to notify either the OS or
firmware of CPU problems, some of which may have been corrected.

To allow this handling to be added, add a do_serror() C function
that just panic()s. Add the entry.S boiler plate to save/restore the
CPU registers and unmask debug exceptions. Future patches may change
do_serror() to return if the SError Interrupt was notification of a
corrected error.

Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
Signed-off-by: Wang Xiongfeng <wangxiongfengi2@huawei.com>
[Split out of a bigger patch, added compat path, renamed, enabled debug
 exceptions]
Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Conflicts:
no vmap_stack in arch/arm64/kernel/traps.c
using old enable_dbg_and_irq instead of enable_daif in
arch/arm64/kernel/entry.S
arch/arm64/kernel/entry.S
arch/arm64/kernel/traps.c