diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2017-06-27 17:30:01 -0500 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-06-30 14:43:29 +1000 |
commit | d98c46b55801015a887fa27752db421280a48f7b (patch) | |
tree | 115ec6a266fbe3c731ea250d84bcde678e089a23 /include | |
parent | bdf6c2a69eae55536aa2e0cff937387e5e151c00 (diff) | |
download | skiboot-d98c46b55801015a887fa27752db421280a48f7b.zip skiboot-d98c46b55801015a887fa27752db421280a48f7b.tar.gz skiboot-d98c46b55801015a887fa27752db421280a48f7b.tar.bz2 |
cpu: Cleanup AMR and IAMR when re-initializing CPUs
There's a bug in current Linux kernels leaving crap in those registers
accross kexec and not sanitizing them on boot. This breaks kexec under
some circumstances (such as booting a hash kernel from a radix one
on P9 DD2.0).
The long term fix is in Linux, but this workaround is a reasonable
way of "sanitizing" those SPRs when Linux calls opal_reinit_cpus()
and shouldn't have adverse effects.
We could also use that same mechanism to cleanup other things as
well such as restoring some other SPRs to their default value in
the future.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/processor.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/processor.h b/include/processor.h index af3fd2b..2e1ac37 100644 --- a/include/processor.h +++ b/include/processor.h @@ -51,6 +51,8 @@ #define SPR_SRR0 0x01a /* RW: Exception save/restore reg 0 */ #define SPR_SRR1 0x01b /* RW: Exception save/restore reg 1 */ #define SPR_CFAR 0x01c /* RW: Come From Address Register */ +#define SPR_AMR 0x01d /* RW: Authority Mask Register */ +#define SPR_IAMR 0x03d /* RW: Instruction Authority Mask Register */ #define SPR_RPR 0x0ba /* RW: Relative Priority Register */ #define SPR_TBRL 0x10c /* RO: Timebase low */ #define SPR_TBRU 0x10d /* RO: Timebase high */ |