Skip to content

tests/amdgpu: Add shared lockdep checks for reset tests

[email protected] igt-dev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2lib/amdgpu: Add shared lockdep violation helperslib/amdgpu/amd_utils.c lib/amdgpu/amd_utils.h tests/amdgpu/amd_lockdep.c+126 -980 replies
2/2tests/amdgpu: Check lockdep violations in reset teststests/amdgpu/amd_deadlock.c tests/amdgpu/amd_dispatch.c tests/amdgpu/amd_queue_reset.c+73 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/2] tests/amdgpu: Add shared lockdep checks for reset tests

From: Vitaly Prosyak <[email protected]>

This series extends the existing amdgpu lockdep validation coverage by moving the common /dev/kmsg and kernel taint checking logic out of amd_lockdep and into shared amdgpu helpers, then using those helpers in additional reset-oriented tests.

Patch 1 is a refactor only and makes no functional change to amd_lockdep. The test still requires CONFIG_LOCKDEP through /proc/lockdep_stats, opens /dev/kmsg at the start of each lockdep-sensitive subtest, records the starting taint state, and fails if a lockdep splat or new TAINT_WARN appears. The helper move keeps that logic in one place so other amdgpu tests can use the same behavior without duplicating the plumbing.

Patch 2 enables the shared optional lockdep checks in amd_dispatch, amd_deadlock, and amd_queue_reset. These tests mostly exercise queue reset and GPU reset paths, including user queue coverage, so they are a useful place to catch lockdep issues while reset and recovery paths are being stressed.

Unlike amd_lockdep, these tests are not dedicated lockdep tests and must continue to run on kernels without CONFIG_LOCKDEP. The new begin/end helper checks /proc/lockdep_stats first; when lockdep is unavailable the check is a no-op, and when lockdep is available each subtest fails if new lockdep traces or TAINT_WARN are observed.

Vitaly Prosyak (2):
lib/amdgpu: Add shared lockdep violation helpers tests/amdgpu: Check lockdep violations in reset tests

 lib/amdgpu/amd_utils.c         | 100 ++++++++++++++++++++++++++++++
 lib/amdgpu/amd_utils.h         |  14 +++++
 tests/amdgpu/amd_deadlock.c    |  45 ++++++++++++++
 tests/amdgpu/amd_dispatch.c    |  25 ++++++++
 tests/amdgpu/amd_lockdep.c     | 110 ++++-----------------------------
 tests/amdgpu/amd_queue_reset.c |   3 +
 6 files changed, 199 insertions(+), 98 deletions(-)
Signature · 1 line
2.55.0