[Skiboot] [PATCH 2/2] OPAL_REINIT_CPUS: clarify that for P9 and above, we can have other flags
Stewart Smith
stewart at linux.vnet.ibm.com
Thu Jul 14 16:57:06 AEST 2016
On P8 we got it a bit wrong and would fall into a workaround for P8 DD1
HILE setting if other bits were set in the flags to OPAL_REINIT_CPUS,
limiting our opportunity to extend it in the future.
Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
core/cpu.c | 4 +++-
doc/opal-api/opal-reinit-cpus-70.txt | 2 ++
doc/opal-api/power9-changes.txt | 5 +++++
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/core/cpu.c b/core/cpu.c
index 20841509052d..f33ac4871614 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -879,8 +879,10 @@ static int64_t opal_reinit_cpus(uint64_t flags)
}
/* Any flags left ? */
- if (flags != 0)
+ if (flags != 0 && proc_gen == proc_gen_p8)
rc = slw_reinit(flags);
+ else if (flags != 0)
+ rc = OPAL_UNSUPPORTED;
/* And undo the above */
lock(&reinit_lock);
diff --git a/doc/opal-api/opal-reinit-cpus-70.txt b/doc/opal-api/opal-reinit-cpus-70.txt
index 27f6f2e89ba4..bf9b238a628b 100644
--- a/doc/opal-api/opal-reinit-cpus-70.txt
+++ b/doc/opal-api/opal-reinit-cpus-70.txt
@@ -22,6 +22,8 @@ flags will return OPAL_UNSUPPORTED.
On POWER8 CPUs, only OPAL_REINIT_CPUS_HILE_BE and OPAL_REINIT_CPUS_HILE_LE
are support and other bits *MUST NOT* be set.
+On POWER9 CPUs, other flags may be supported in the future.
+
Returns:
- OPAL_SUCCESS
- OPAL_UNSUPPORTED
diff --git a/doc/opal-api/power9-changes.txt b/doc/opal-api/power9-changes.txt
index 1935e1279147..cf354d60ac63 100644
--- a/doc/opal-api/power9-changes.txt
+++ b/doc/opal-api/power9-changes.txt
@@ -10,6 +10,11 @@ parts of the OPAL API.
Eventually, when the kernel drops support for POWER8 and before, we can then
remove the associated kernel code too.
+OPAL_REINIT_CPUS
+----------------
+Can now be extended beyond HILE BE/LE bits. If invalid flags are set on
+POWER9, OPAL_UNSUPPORTED will be returned.
+
TODO
----
--
2.1.4
More information about the Skiboot
mailing list