Skip to contentSkip to conversation

accel/amdxdna: Fix fatal_error_info layout in firmware interface

PATCH In review Lizhi Hou 2 participants 3 messages Apr 14 – Apr 15

Subsystems (2)
lore
Share & tools
lore

Lizhi Hou

author maintainer
#0 lore raw

PATCH 1/1 accel/amdxdna: Fix fatal_error_info layout in firmware interface

From: Max Zhen <[email protected]>

Adjust struct fatal_error_info to match the expected driver/firmware interface layout.

The structure is used to retrieve debug information from firmware when a command becomes stuck on the device. The reserved field currently uses 128 u32 entries, which makes the structure larger than intended and causes the layout to no longer match the firmware definition.

Reduce the reserved array size from 128 to 127 entries so the structure matches the expected interface format.

Fixes 25854131c04a ("accel/amdxdna: Support retrieving hardware context debug information")
---
 drivers/accel/amdxdna/aie2_msg_priv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/accel/amdxdna/aie2_msg_priv.h +1 -1
index fc2e99510980..b10552c627ee 100644
@@ -461,7 +461,7 @@ struct fatal_error_info {
 	__u32 exception_pc;       /* Program Counter at the time of the exception */
 	__u32 app_module;         /* Error module name */
 	__u32 task_index;         /* Index of the task in which the error occurred */
-	__u32 reserved[128];
+	__u32 reserved[127];
 };
 
 struct app_health_report {
Signature · 1 line
2.34.1
Reviewed-by Mario Limonciello (AMD) on v1 1/1
#1 lore raw
Quoted 10 lines · Lizhi Hou

From: Max Zhen <[email protected]>

Adjust struct fatal_error_info to match the expected driver/firmware interface layout.

The structure is used to retrieve debug information from firmware when a command becomes stuck on the device. The reserved field currently uses 128 u32 entries, which makes the structure larger than intended and causes the layout to no longer match the firmware definition.

Quoted 6 lines

Reduce the reserved array size from 128 to 127 entries so the structure matches the expected interface format.

Fixes 25854131c04a ("accel/amdxdna: Support retrieving hardware context debug information")
Quoted 17 lines
---
  drivers/accel/amdxdna/aie2_msg_priv.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/accel/amdxdna/aie2_msg_priv.h +1 -1
index fc2e99510980..b10552c627ee 100644
@@ -461,7 +461,7 @@ struct fatal_error_info {
  	__u32 exception_pc;       /* Program Counter at the time of the exception */
  	__u32 app_module;         /* Error module name */
  	__u32 task_index;         /* Index of the task in which the error occurred */
-	__u32 reserved[128];
+	__u32 reserved[127];
  };
 
  struct app_health_report {
author maintainer Applied
#2 lore raw

Applied to drm-misc-next

Quoted 38 lines · Mario Limonciello
Quoted 10 lines · Lizhi Hou

From: Max Zhen <[email protected]>

Adjust struct fatal_error_info to match the expected driver/firmware interface layout.

The structure is used to retrieve debug information from firmware when a command becomes stuck on the device. The reserved field currently uses 128 u32 entries, which makes the structure larger than intended and causes the layout to no longer match the firmware definition.

Quoted 6 lines

Reduce the reserved array size from 128 to 127 entries so the structure matches the expected interface format.

Fixes 25854131c04a ("accel/amdxdna: Support retrieving hardware context debug information")
Quoted 16 lines

---
  drivers/accel/amdxdna/aie2_msg_priv.h | 2 +-

  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/accel/amdxdna/aie2_msg_priv.h +0 -0
index fc2e99510980..b10552c627ee 100644
@@ -461,7 +461,7 @@ struct fatal_error_info {

      __u32 exception_pc;       /* Program Counter at the time of the exception */ __u32 app_module;         /* Error module name */
      __u32 task_index;         /* Index of the task in which the error occurred */ -    __u32 reserved[128];
+    __u32 reserved[127];
  };
    struct app_health_report {