Commit d118b18
drm/amd/pm: avoid large variable on kernel stack
The activity_monitor_external[] array is too big to fit on the
kernel stack, resulting in this warning with clang:
drivers/gpu/drm/amd/amdgpu/../pm/swsmu/smu13/smu_v13_0_7_ppt.c:1438:12: error: stack frame size (1040) exceeds limit (1024) in 'smu_v13_0_7_get_power_profile_mode' [-Werror,-Wframe-larger-than]
Use dynamic allocation instead. It should also be possible to
have single element here instead of the array, but this seems
easier.
v2: fix up argument to sizeof() (Alex)
Fixes: 334682a ("drm/amd/pm: enable workload type change on smu_v13_0_7")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>1 parent 1a799c4 commit d118b18
1 file changed
+16
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1440 | 1440 | | |
1441 | 1441 | | |
1442 | 1442 | | |
1443 | | - | |
| 1443 | + | |
1444 | 1444 | | |
1445 | 1445 | | |
1446 | 1446 | | |
1447 | 1447 | | |
1448 | 1448 | | |
1449 | 1449 | | |
1450 | 1450 | | |
| 1451 | + | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
| 1455 | + | |
| 1456 | + | |
1451 | 1457 | | |
1452 | 1458 | | |
1453 | 1459 | | |
| |||
1460 | 1466 | | |
1461 | 1467 | | |
1462 | 1468 | | |
1463 | | - | |
1464 | | - | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
| 1472 | + | |
1465 | 1473 | | |
1466 | 1474 | | |
1467 | 1475 | | |
1468 | 1476 | | |
1469 | 1477 | | |
1470 | 1478 | | |
1471 | | - | |
| 1479 | + | |
1472 | 1480 | | |
1473 | 1481 | | |
1474 | 1482 | | |
| |||
1496 | 1504 | | |
1497 | 1505 | | |
1498 | 1506 | | |
1499 | | - | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
1500 | 1511 | | |
1501 | 1512 | | |
1502 | 1513 | | |
| |||
0 commit comments