[Skiboot] [PATCH 2/4] hw/occ: Fix OCC structure layout
Nicholas Piggin
npiggin at gmail.com
Mon Nov 18 00:33:47 AEDT 2024
POWER10 addition accidentally changed a structure size by one byte.
Fixes: c8c36ada1d ("occ: Add POWER10 support")
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
hw/occ.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/hw/occ.c b/hw/occ.c
index bf2b2f9d0..0a02d8368 100644
--- a/hw/occ.c
+++ b/hw/occ.c
@@ -261,12 +261,14 @@ struct occ_dynamic_data {
u8 major_version;
u8 minor_version;
u8 gpus_present;
- struct __packed { /* Version 0x90 */
- u8 spare1;
- } v9;
- struct __packed { /* Version 0xA0 */
- u8 wof_enabled;
- } v10;
+ union __packed {
+ struct __packed { /* Version 0x90 */
+ u8 spare1;
+ } v9;
+ struct __packed { /* Version 0xA0 */
+ u8 wof_enabled;
+ } v10;
+ };
u8 cpu_throttle;
u8 mem_throttle;
u8 quick_pwr_drop;
--
2.45.2
More information about the Skiboot
mailing list