[Skiboot] [PATCH 09/17] core/opal: move HIR trigger to FSP poller
Stewart Smith
stewart at linux.ibm.com
Tue Jun 18 17:29:17 AEST 2019
Signed-off-by: Stewart Smith <stewart at linux.ibm.com>
---
core/opal.c | 14 --------------
hw/fsp/fsp.c | 17 +++++++++++++++++
2 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/core/opal.c b/core/opal.c
index 3a2fbb95b05d..650811642590 100644
--- a/core/opal.c
+++ b/core/opal.c
@@ -53,12 +53,6 @@ static uint64_t opal_dynamic_events;
extern uint32_t attn_trigger;
extern uint32_t hir_trigger;
-/* We make this look like a Surveillance error, even though it really
- * isn't one.
- */
-DEFINE_LOG_ENTRY(OPAL_INJECTED_HIR, OPAL_MISC_ERR_EVT, OPAL_SURVEILLANCE,
- OPAL_SURVEILLANCE_ERR, OPAL_PREDICTIVE_ERR_GENERAL,
- OPAL_MISCELLANEOUS_INFO_ONLY);
void opal_table_init(void)
{
@@ -637,14 +631,6 @@ static int64_t opal_poll_events(__be64 *outstanding_event_mask)
assert(false);
}
- /* Test the host initiated reset */
- if (hir_trigger == 0xdeadbeef) {
- uint32_t plid = log_simple_error(&e_info(OPAL_INJECTED_HIR),
- "SURV: Injected HIR, initiating FSP R/R\n");
- fsp_trigger_reset(plid);
- hir_trigger = 0;
- }
-
opal_run_pollers();
if (outstanding_event_mask)
diff --git a/hw/fsp/fsp.c b/hw/fsp/fsp.c
index aa393c719cd4..4415ab5a5952 100644
--- a/hw/fsp/fsp.c
+++ b/hw/fsp/fsp.c
@@ -38,6 +38,8 @@
#include <opal-msg.h>
#include <ccan/list/list.h>
+extern uint32_t hir_trigger;
+
DEFINE_LOG_ENTRY(OPAL_RC_FSP_POLL_TIMEOUT, OPAL_PLATFORM_ERR_EVT, OPAL_FSP,
OPAL_PLATFORM_FIRMWARE, OPAL_RECOVERED_ERR_GENERAL, OPAL_NA);
@@ -47,6 +49,13 @@ DEFINE_LOG_ENTRY(OPAL_RC_FSP_MBOX_ERR, OPAL_PLATFORM_ERR_EVT, OPAL_FSP,
DEFINE_LOG_ENTRY(OPAL_RC_FSP_DISR_HIR_MASK, OPAL_PLATFORM_ERR_EVT, OPAL_FSP,
OPAL_PLATFORM_FIRMWARE, OPAL_RECOVERED_ERR_GENERAL, OPAL_NA);
+/* We make this look like a Surveillance error, even though it really
+ * isn't one.
+ */
+DEFINE_LOG_ENTRY(OPAL_INJECTED_HIR, OPAL_MISC_ERR_EVT, OPAL_SURVEILLANCE,
+ OPAL_SURVEILLANCE_ERR, OPAL_PREDICTIVE_ERR_GENERAL,
+ OPAL_MISCELLANEOUS_INFO_ONLY);
+
#define FSP_TRACE_MSG
#define FSP_TRACE_EVENT
@@ -2026,6 +2035,14 @@ static void fsp_create_fsp(struct dt_node *fsp_node)
static void fsp_opal_poll(void *data __unused)
{
+ /* Test the host initiated reset */
+ if (hir_trigger == 0xdeadbeef) {
+ uint32_t plid = log_simple_error(&e_info(OPAL_INJECTED_HIR),
+ "SURV: Injected HIR, initiating FSP R/R\n");
+ fsp_trigger_reset(plid);
+ hir_trigger = 0;
+ }
+
if (try_lock(&fsp_lock)) {
__fsp_poll(false);
unlock(&fsp_lock);
--
2.21.0
More information about the Skiboot
mailing list