diff options
author | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2020-06-17 12:46:10 +0530 |
---|---|---|
committer | Oliver O'Halloran <oohall@gmail.com> | 2020-06-30 12:07:23 +1000 |
commit | edc936afb6e34a9182244c7f4e9f117afd52fb6e (patch) | |
tree | 9041088cc841eb22db1bf99364aa30e2bfbc4303 /core | |
parent | 9f5374b46aab4a2980d5bf745d79fa9d7bb609e1 (diff) | |
download | skiboot-edc936afb6e34a9182244c7f4e9f117afd52fb6e.zip skiboot-edc936afb6e34a9182244c7f4e9f117afd52fb6e.tar.gz skiboot-edc936afb6e34a9182244c7f4e9f117afd52fb6e.tar.bz2 |
mpipl: Move opal_mpipl_save_crashing_pir() call to platform specific code
Commit 34664746 moved opal_mpipl_save_crashing_pir() function call from
platform specific code to generic assert() path. I completely missed
to take care of all terminate path :-(
This resulted in breaking `opalcore` on Linux kernel initiated MPIPL. As :
- Linux initiated MPIPL calls platform termination function directly
- ELF core format needs crashing CPU details to generate proper code
Hence I think it makes sense to move this back to platform specific
terminate handler code.
Today we have two ways to trigger MPIPL based on service processor.
- On BMC system we call SBE S0 interrupt
- On FSP system we call `attn` instruction
In future if we add new ways to trigger MPIPL then we have to add platform
specific support code anyway. That way its fine to move this to platform
sepcific code.
One alternative is to make this call in all code path before making
platform.terminate call... which makes it more complicated than above approach.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/opal-dump.c | 8 | ||||
-rw-r--r-- | core/utils.c | 4 |
2 files changed, 1 insertions, 11 deletions
diff --git a/core/opal-dump.c b/core/opal-dump.c index ca6bf06..4f54a3e 100644 --- a/core/opal-dump.c +++ b/core/opal-dump.c @@ -489,13 +489,7 @@ static void post_mpipl_get_opal_data(void) void opal_mpipl_save_crashing_pir(void) { - struct dt_node *opal_node; - - opal_node = dt_find_by_path(dt_root, "ibm,opal"); - if (!opal_node) - return; - - if (!dt_find_by_path(opal_node, "dump")) + if (!is_mpipl_enabled()) return; mpipl_metadata->crashing_pir = this_cpu()->pir; diff --git a/core/utils.c b/core/utils.c index d778fcd..0d2f5e8 100644 --- a/core/utils.c +++ b/core/utils.c @@ -12,7 +12,6 @@ #include <processor.h> #include <cpu.h> #include <stack.h> -#include <opal-dump.h> void __noreturn assert_fail(const char *msg, const char *file, unsigned int line, const char *function) @@ -34,9 +33,6 @@ void __noreturn assert_fail(const char *msg, const char *file, prlog(PR_EMERG, "assert failed at %s:%u: %s\n", file, line, msg); backtrace(); - /* Save crashing CPU details */ - opal_mpipl_save_crashing_pir(); - if (platform.terminate) platform.terminate(msg); |