drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:522:2: error: static assertion failed due to requirement 'sizeof(struct amdsriov_ras_telemetry) <= 64 << 10': amdsriov_ras_telemetry must be 64 KB
kernel test robot
build bottree: https://gitlab.freedesktop.org/agd5f/linux.git drm-next head: 9973e64bd6ee7642860a6f3b6958cbf14e89cabd commit: cb48a6b2b61d7ebf2f1099041067800ffd8a5c2d [80/95] drm/amd/ras: use dedicated memory as vf ras command buffer config: sparc64-allmodconfig (https://download.01.org/0day-ci/archive/20260226/[email protected]/config) compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 9a109fbb6e184ec9bcce10615949f598f4c974a9) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260226/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c:44:
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu.h:86:
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h:27:
>> drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:522:2: error: static assertion failed due to requirement 'sizeof(struct amdsriov_ras_telemetry) <= 64 << 10': amdsriov_ras_telemetry must be 64 KB
522 | sizeof(struct amdsriov_ras_telemetry) <= AMD_SRIOV_MSG_RAS_TELEMETRY_SIZE_KB_V1 << 10,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:522:40: note: expression evaluates to '115616 <= 65536'
522 | sizeof(struct amdsriov_ras_telemetry) <= AMD_SRIOV_MSG_RAS_TELEMETRY_SIZE_KB_V1 << 10,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1 error generated.
--
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:28:
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu.h:86:
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h:27:
>> drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:522:2: error: static assertion failed due to requirement 'sizeof(struct amdsriov_ras_telemetry) <= 64 << 10': amdsriov_ras_telemetry must be 64 KB
522 | sizeof(struct amdsriov_ras_telemetry) <= AMD_SRIOV_MSG_RAS_TELEMETRY_SIZE_KB_V1 << 10,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:522:40: note: expression evaluates to '115616 <= 65536'
522 | sizeof(struct amdsriov_ras_telemetry) <= AMD_SRIOV_MSG_RAS_TELEMETRY_SIZE_KB_V1 << 10,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/amd/amdgpu/amdgpu_display.c:49:
In file included from include/drm/drm_vblank.h:30:
include/linux/poll.h:134:27: warning: division by zero is undefined [-Wdivision-by-zero]
134 | M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
| ^~~~~~~~~
include/linux/poll.h:132:32: note: expanded from macro 'M'
132 | #define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/poll.h:118:51: note: expanded from macro '__MAP'
118 | (from < to ? (v & from) * (to/from) : (v & from) / (from/to))
| ^ ~~~~~~~~~
include/linux/poll.h:134:39: warning: division by zero is undefined [-Wdivision-by-zero]
134 | M(RDNORM) | M(RDBAND) | M(WRNORM) | M(WRBAND) |
| ^~~~~~~~~
include/linux/poll.h:132:32: note: expanded from macro 'M'
132 | #define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/poll.h:118:51: note: expanded from macro '__MAP'
118 | (from < to ? (v & from) * (to/from) : (v & from) / (from/to))
| ^ ~~~~~~~~~
include/linux/poll.h:135:12: warning: division by zero is undefined [-Wdivision-by-zero]
135 | M(HUP) | M(RDHUP) | M(MSG);
| ^~~~~~~~
include/linux/poll.h:132:32: note: expanded from macro 'M'
132 | #define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/poll.h:118:51: note: expanded from macro '__MAP'
118 | (from < to ? (v & from) * (to/from) : (v & from) / (from/to))
| ^ ~~~~~~~~~
include/linux/poll.h:135:23: warning: division by zero is undefined [-Wdivision-by-zero]
135 | M(HUP) | M(RDHUP) | M(MSG);
| ^~~~~~
include/linux/poll.h:132:32: note: expanded from macro 'M'
132 | #define M(X) (__force __poll_t)__MAP(val, POLL##X, (__force __u16)EPOLL##X)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/poll.h:118:51: note: expanded from macro '__MAP'
118 | (from < to ? (v & from) * (to/from) : (v & from) / (from/to))
| ^ ~~~~~~~~~
4 warnings and 1 error generated.
--
In file included from drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu11/arcturus_ppt.c:27:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu.h:86:
In file included from drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgpu_virt.h:27:
>> drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:522:2: error: static assertion failed due to requirement 'sizeof(struct amdsriov_ras_telemetry) <= 64 << 10': amdsriov_ras_telemetry must be 64 KB
522 | sizeof(struct amdsriov_ras_telemetry) <= AMD_SRIOV_MSG_RAS_TELEMETRY_SIZE_KB_V1 << 10,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../amdgpu/amdgv_sriovmsg.h:522:40: note: expression evaluates to '115616 <= 65536'
522 | sizeof(struct amdsriov_ras_telemetry) <= AMD_SRIOV_MSG_RAS_TELEMETRY_SIZE_KB_V1 << 10,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~1 error generated.
vim +522 drivers/gpu/drm/amd/amdgpu/amdgv_sriovmsg.h
506
507 _Static_assert(
508 sizeof(struct amd_sriov_msg_vf2pf_info) == AMD_SRIOV_MSG_SIZE_KB << 10,
509 "amd_sriov_msg_vf2pf_info must be " stringification(AMD_SRIOV_MSG_SIZE_KB) " KB");
510
511 _Static_assert(
512 sizeof(struct amd_sriov_msg_pf2vf_info) == AMD_SRIOV_MSG_SIZE_KB << 10,
513 "amd_sriov_msg_pf2vf_info must be " stringification(AMD_SRIOV_MSG_SIZE_KB) " KB");
514
515 _Static_assert(AMD_SRIOV_MSG_RESERVE_UCODE % 4 == 0,
516 "AMD_SRIOV_MSG_RESERVE_UCODE must be multiple of 4");
517
518 _Static_assert(AMD_SRIOV_MSG_RESERVE_UCODE > AMD_SRIOV_UCODE_ID__MAX,
519 "AMD_SRIOV_MSG_RESERVE_UCODE must be bigger than AMD_SRIOV_UCODE_ID__MAX");
520
521 _Static_assert(
> 522 sizeof(struct amdsriov_ras_telemetry) <= AMD_SRIOV_MSG_RAS_TELEMETRY_SIZE_KB_V1 << 10,
523 "amdsriov_ras_telemetry must be " stringification(AMD_SRIOV_MSG_RAS_TELEMETRY_SIZE_KB_V1) " KB");
524
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki