aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2021-08-04 12:51:12 +0530
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2021-08-06 12:26:20 +0530
commit99041844eedca00bfedbd6181e3d4353d6e98a1d (patch)
tree7b3f19465a2c606eb0fd6f6ec91f19b081170d23 /hw
parent7a93eccd43b948dd2feb411874e4ddcf8898133d (diff)
downloadskiboot-99041844eedca00bfedbd6181e3d4353d6e98a1d.zip
skiboot-99041844eedca00bfedbd6181e3d4353d6e98a1d.tar.gz
skiboot-99041844eedca00bfedbd6181e3d4353d6e98a1d.tar.bz2
xive/p10: Add option flags to the XIVE exploitation mode
Change sligthly the semantic of the parameter of the opal_xive_reset() OPAL call to configure the interrupt mode of the machine and, at the same time, to configure the associated options. These options only apply to the XIVE exploitation mode. Signed-off-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/xive2.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/hw/xive2.c b/hw/xive2.c
index ab482eb..a267df6 100644
--- a/hw/xive2.c
+++ b/hw/xive2.c
@@ -171,6 +171,14 @@ static enum {
} xive_mode = XIVE_MODE_NONE;
/*
+ * The XIVE exploitation mode options indicates the active features and
+ * is part of the mode parameter of the opal_xive_reset() call
+ */
+static uint64_t xive_expl_options;
+
+#define XIVE_EXPL_ALL_OPTIONS 0
+
+/*
* Each source controller has one of these. There's one embedded in
* the XIVE struct for IPIs
*/
@@ -3895,11 +3903,11 @@ void xive2_cpu_reset(void)
in_be64(xs->tm_ring1 + TM_SPC_PULL_POOL_CTX);
}
-static int64_t __xive_reset(uint64_t version)
+static int64_t __xive_reset(uint64_t mode)
{
struct proc_chip *chip;
- xive_mode = version;
+ xive_mode = mode;
/* Mask all interrupt sources */
irq_for_each_source(xive_reset_mask_source_cb, NULL);
@@ -3937,13 +3945,20 @@ int64_t xive2_reset(void)
return __xive_reset(XIVE_MODE_EXPL);
}
-static int64_t opal_xive_reset(uint64_t version)
+static int64_t opal_xive_reset(uint64_t mode)
{
- prlog(PR_DEBUG, "XIVE reset, version: %d...\n", (int)version);
+ prlog(PR_DEBUG, "XIVE reset. mode = %llx\n", mode);
- if (version != XIVE_MODE_EXPL) {
- prerror("ignoring version %lld at reset. "
- "XIVE exploitation mode is the default\n", version);
+ if (!(mode & XIVE_MODE_EXPL)) {
+ prlog(PR_NOTICE, "No emulation mode. XIVE exploitation mode "
+ "is the default\n");
+ }
+
+ xive_expl_options = mode & ~XIVE_MODE_EXPL;
+ if (xive_expl_options & ~XIVE_EXPL_ALL_OPTIONS) {
+ prerror("invalid XIVE exploitation mode option %016llx\n",
+ xive_expl_options);
+ return OPAL_PARAMETER;
}
return __xive_reset(XIVE_MODE_EXPL);