Subject: linux-next: build failure after merge of the amdgpu tree

From: Stephen Rothwell <[email-masked]>
Date: Fri, 6 May 2022 11:06:46 +1000

Hi all,

After merging the amdgpu tree, today's linux-next build (x86_64
allmodconfig) failed like this:

drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c: In function 'smu_v13_0_7_get_power_profile_mode':
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1364:84: error: array subscript 8 is above array bounds of 'DpmActivityMonitorCoeffIntExternal_t[8]' [-Werror=array-bounds]
 1364 |                 size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[i].DpmActivityMonitorCoeffInt.field);               \
      |                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1381:9: note: in expansion of macro 'PRINT_DPM_MONITOR'
 1381 |         PRINT_DPM_MONITOR(Fclk_BoosterFreq);
      |         ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1328:46: note: while referencing 'activity_monitor_external'
 1328 |         DpmActivityMonitorCoeffIntExternal_t activity_monitor_external[PP_SMC_POWER_PROFILE_COUNT];
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1364:84: error: array subscript 8 is above array bounds of 'DpmActivityMonitorCoeffIntExternal_t[8]' [-Werror=array-bounds]
 1364 |                 size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[i].DpmActivityMonitorCoeffInt.field);               \
      |                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1380:9: note: in expansion of macro 'PRINT_DPM_MONITOR'
 1380 |         PRINT_DPM_MONITOR(Fclk_MinActiveFreq);
      |         ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1328:46: note: while referencing 'activity_monitor_external'
 1328 |         DpmActivityMonitorCoeffIntExternal_t activity_monitor_external[PP_SMC_POWER_PROFILE_COUNT];
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1364:84: error: array subscript 8 is above array bounds of 'DpmActivityMonitorCoeffIntExternal_t[8]' [-Werror=array-bounds]
 1364 |                 size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[i].DpmActivityMonitorCoeffInt.field);               \
      |                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1379:9: note: in expansion of macro 'PRINT_DPM_MONITOR'
 1379 |         PRINT_DPM_MONITOR(Fclk_BoosterFreqType);
      |         ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1328:46: note: while referencing 'activity_monitor_external'
 1328 |         DpmActivityMonitorCoeffIntExternal_t activity_monitor_external[PP_SMC_POWER_PROFILE_COUNT];
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1364:84: error: array subscript 8 is above array bounds of 'DpmActivityMonitorCoeffIntExternal_t[8]' [-Werror=array-bounds]
 1364 |                 size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[i].DpmActivityMonitorCoeffInt.field);               \
      |                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1378:9: note: in expansion of macro 'PRINT_DPM_MONITOR'
 1378 |         PRINT_DPM_MONITOR(Fclk_MinActiveFreqType);
      |         ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1328:46: note: while referencing 'activity_monitor_external'
 1328 |         DpmActivityMonitorCoeffIntExternal_t activity_monitor_external[PP_SMC_POWER_PROFILE_COUNT];
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1364:84: error: array subscript 8 is above array bounds of 'DpmActivityMonitorCoeffIntExternal_t[8]' [-Werror=array-bounds]
 1364 |                 size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[i].DpmActivityMonitorCoeffInt.field);               \
      |                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1377:9: note: in expansion of macro 'PRINT_DPM_MONITOR'
 1377 |         PRINT_DPM_MONITOR(Fclk_FPS);
      |         ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1328:46: note: while referencing 'activity_monitor_external'
 1328 |         DpmActivityMonitorCoeffIntExternal_t activity_monitor_external[PP_SMC_POWER_PROFILE_COUNT];
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1364:84: error: array subscript 8 is above array bounds of 'DpmActivityMonitorCoeffIntExternal_t[8]' [-Werror=array-bounds]
 1364 |                 size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[i].DpmActivityMonitorCoeffInt.field);               \
      |                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1376:9: note: in expansion of macro 'PRINT_DPM_MONITOR'
 1376 |         PRINT_DPM_MONITOR(Fclk_IdleHystLimit);
      |         ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1328:46: note: while referencing 'activity_monitor_external'
 1328 |         DpmActivityMonitorCoeffIntExternal_t activity_monitor_external[PP_SMC_POWER_PROFILE_COUNT];
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1364:84: error: array subscript 8 is above array bounds of 'DpmActivityMonitorCoeffIntExternal_t[8]' [-Werror=array-bounds]
 1364 |                 size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[i].DpmActivityMonitorCoeffInt.field);               \
      |                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1375:9: note: in expansion of macro 'PRINT_DPM_MONITOR'
 1375 |         PRINT_DPM_MONITOR(Fclk_ActiveHystLimit);
      |         ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1328:46: note: while referencing 'activity_monitor_external'
 1328 |         DpmActivityMonitorCoeffIntExternal_t activity_monitor_external[PP_SMC_POWER_PROFILE_COUNT];
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1364:84: error: array subscript 8 is above array bounds of 'DpmActivityMonitorCoeffIntExternal_t[8]' [-Werror=array-bounds]
 1364 |                 size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[i].DpmActivityMonitorCoeffInt.field);               \
      |                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1374:9: note: in expansion of macro 'PRINT_DPM_MONITOR'
 1374 |         PRINT_DPM_MONITOR(Gfx_BoosterFreq);
      |         ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1328:46: note: while referencing 'activity_monitor_external'
 1328 |         DpmActivityMonitorCoeffIntExternal_t activity_monitor_external[PP_SMC_POWER_PROFILE_COUNT];
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1364:84: error: array subscript 8 is above array bounds of 'DpmActivityMonitorCoeffIntExternal_t[8]' [-Werror=array-bounds]
 1364 |                 size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[i].DpmActivityMonitorCoeffInt.field);               \
      |                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1373:9: note: in expansion of macro 'PRINT_DPM_MONITOR'
 1373 |         PRINT_DPM_MONITOR(Gfx_MinActiveFreq);
      |         ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1328:46: note: while referencing 'activity_monitor_external'
 1328 |         DpmActivityMonitorCoeffIntExternal_t activity_monitor_external[PP_SMC_POWER_PROFILE_COUNT];
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1364:84: error: array subscript 8 is above array bounds of 'DpmActivityMonitorCoeffIntExternal_t[8]' [-Werror=array-bounds]
 1364 |                 size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[i].DpmActivityMonitorCoeffInt.field);               \
      |                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1372:9: note: in expansion of macro 'PRINT_DPM_MONITOR'
 1372 |         PRINT_DPM_MONITOR(Gfx_BoosterFreqType);
      |         ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1328:46: note: while referencing 'activity_monitor_external'
 1328 |         DpmActivityMonitorCoeffIntExternal_t activity_monitor_external[PP_SMC_POWER_PROFILE_COUNT];
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1364:84: error: array subscript 8 is above array bounds of 'DpmActivityMonitorCoeffIntExternal_t[8]' [-Werror=array-bounds]
 1364 |                 size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[i].DpmActivityMonitorCoeffInt.field);               \
      |                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1371:9: note: in expansion of macro 'PRINT_DPM_MONITOR'
 1371 |         PRINT_DPM_MONITOR(Gfx_MinActiveFreqType);
      |         ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1328:46: note: while referencing 'activity_monitor_external'
 1328 |         DpmActivityMonitorCoeffIntExternal_t activity_monitor_external[PP_SMC_POWER_PROFILE_COUNT];
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1364:84: error: array subscript 8 is above array bounds of 'DpmActivityMonitorCoeffIntExternal_t[8]' [-Werror=array-bounds]
 1364 |                 size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[i].DpmActivityMonitorCoeffInt.field);               \
      |                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1370:9: note: in expansion of macro 'PRINT_DPM_MONITOR'
 1370 |         PRINT_DPM_MONITOR(Gfx_FPS);
      |         ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1328:46: note: while referencing 'activity_monitor_external'
 1328 |         DpmActivityMonitorCoeffIntExternal_t activity_monitor_external[PP_SMC_POWER_PROFILE_COUNT];
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1364:84: error: array subscript 8 is above array bounds of 'DpmActivityMonitorCoeffIntExternal_t[8]' [-Werror=array-bounds]
 1364 |                 size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[i].DpmActivityMonitorCoeffInt.field);               \
      |                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1369:9: note: in expansion of macro 'PRINT_DPM_MONITOR'
 1369 |         PRINT_DPM_MONITOR(Gfx_IdleHystLimit);
      |         ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1328:46: note: while referencing 'activity_monitor_external'
 1328 |         DpmActivityMonitorCoeffIntExternal_t activity_monitor_external[PP_SMC_POWER_PROFILE_COUNT];
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1364:84: error: array subscript 8 is above array bounds of 'DpmActivityMonitorCoeffIntExternal_t[8]' [-Werror=array-bounds]
 1364 |                 size += sysfs_emit_at(buf, size, "%-16d", activity_monitor_external[i].DpmActivityMonitorCoeffInt.field);               \
      |                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1368:9: note: in expansion of macro 'PRINT_DPM_MONITOR'
 1368 |         PRINT_DPM_MONITOR(Gfx_ActiveHystLimit);
      |         ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1328:46: note: while referencing 'activity_monitor_external'
 1328 |         DpmActivityMonitorCoeffIntExternal_t activity_monitor_external[PP_SMC_POWER_PROFILE_COUNT];
      |                                              ^~~~~~~~~~~~~~~~~~~~~~~~~

Caused by commit

  878205b8c170 ("drm/amd/pm: enable workload type change on smu_v13_0_7")

I have used the amdgpu tree from next-20220505 for today.

-- 
Cheers,
Stephen Rothwell