Skip to content

Commit de00998

Browse files
andrealmeidalexdeucher
authored andcommitted
drm/amdgpu: Create version number for coredumps
Even if there's nothing currently parsing amdgpu's coredump files, if we eventually have such tools they will be glad to find a version field to properly read the file. Create a version number to be displayed on top of coredump file, to be incremented when the file format or content get changed. Signed-off-by: André Almeida <[email protected]> Reviewed-by: Shashank Sharma <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 6961986 commit de00998

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ amdgpu_devcoredump_read(char *buffer, loff_t offset, size_t count,
185185
p = drm_coredump_printer(&iter);
186186

187187
drm_printf(&p, "**** AMDGPU Device Coredump ****\n");
188+
drm_printf(&p, "version: " AMDGPU_COREDUMP_VERSION "\n");
188189
drm_printf(&p, "kernel: " UTS_RELEASE "\n");
189190
drm_printf(&p, "module: " KBUILD_MODNAME "\n");
190191
drm_printf(&p, "time: %lld.%09ld\n", coredump->reset_time.tv_sec,

drivers/gpu/drm/amd/amdgpu/amdgpu_reset.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ struct amdgpu_reset_domain {
9090
};
9191

9292
#ifdef CONFIG_DEV_COREDUMP
93+
94+
#define AMDGPU_COREDUMP_VERSION "1"
95+
9396
struct amdgpu_coredump_info {
9497
struct amdgpu_device *adev;
9598
struct amdgpu_task_info reset_task_info;

0 commit comments

Comments
 (0)