2019-06-03 07:44:50 +02:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-09 10:42:12 -07:00
|
|
|
|
|
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
2013-11-16 12:56:06 -05:00
|
|
|
|
2016-03-15 15:35:08 -04:00
|
|
|
|
2018-11-02 09:25:21 -06:00
|
|
|
|
2024-04-01 05:42:35 +03:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
2017-09-13 10:17:18 -04:00
|
|
|
|
2018-07-24 10:33:27 -06:00
|
|
|
|
2019-09-18 21:57:07 +02:00
|
|
|
|
2026-01-27 16:33:34 +09:00
|
|
|
|
2026-04-28 16:45:53 +02:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-20 23:19:26 +05:30
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-20 23:19:26 +05:30
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-07 10:02:56 -07:00
|
|
|
|
2023-02-23 11:51:59 +01:00
|
|
|
|
2016-11-28 12:28:31 -07:00
|
|
|
|
2016-11-28 12:28:33 -07:00
|
|
|
|
2017-03-07 10:02:56 -07:00
|
|
|
|
|
|
|
|
|
2016-11-28 12:28:33 -07:00
|
|
|
|
2018-08-06 11:33:21 -06:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-08-06 11:33:21 -06:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
2017-03-07 10:02:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-07 10:02:56 -07:00
|
|
|
|
2023-02-23 11:51:59 +01:00
|
|
|
|
2016-11-28 12:28:31 -07:00
|
|
|
|
2017-03-07 10:02:56 -07:00
|
|
|
|
|
|
|
|
|
2016-11-28 12:28:33 -07:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-19 14:04:22 +08:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-19 14:04:22 +08:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 15:36:33 -05:00
|
|
|
|
2020-09-01 08:41:56 -07:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-26 07:46:48 -07:00
|
|
|
|
2018-01-10 10:41:54 -07:00
|
|
|
|
2017-02-10 15:36:33 -05:00
|
|
|
|
|
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 15:36:33 -05:00
|
|
|
|
2020-09-01 08:41:56 -07:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
2021-07-26 07:46:48 -07:00
|
|
|
|
2018-01-10 10:41:54 -07:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-03-24 18:23:53 -07:00
|
|
|
|
|
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-29 13:12:47 -07:00
|
|
|
|
2022-06-09 10:42:12 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 15:36:33 -05:00
|
|
|
|
2014-01-11 16:25:08 -05:00
|
|
|
|
2017-02-10 15:36:33 -05:00
|
|
|
|
2014-01-11 16:25:08 -05:00
|
|
|
|
2021-11-09 10:11:03 -08:00
|
|
|
|
2017-06-13 09:15:36 -04:00
|
|
|
|
2017-02-10 15:36:33 -05:00
|
|
|
|
|
|
|
|
|
2014-01-11 16:25:08 -05:00
|
|
|
|
2017-02-10 15:36:33 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-01-11 16:25:08 -05:00
|
|
|
|
2017-02-10 15:36:33 -05:00
|
|
|
|
2014-01-11 16:25:08 -05:00
|
|
|
|
|
|
|
|
|
2018-07-24 10:33:27 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-04-28 16:45:53 +02:00
|
|
|
|
2018-07-24 10:33:27 -06:00
|
|
|
|
2025-11-13 15:32:20 +01:00
|
|
|
|
2018-07-24 10:33:27 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-24 10:33:31 -06:00
|
|
|
|
2025-06-29 13:13:08 -07:00
|
|
|
|
|
|
|
|
|
2018-07-24 10:33:31 -06:00
|
|
|
|
|
|
|
|
|
2024-05-13 08:51:47 -07:00
|
|
|
|
2018-07-24 10:33:31 -06:00
|
|
|
|
|
|
|
|
|
2025-06-29 13:13:08 -07:00
|
|
|
|
2024-05-13 08:51:47 -07:00
|
|
|
|
2018-07-24 10:33:31 -06:00
|
|
|
|
|
|
|
|
|
2024-05-13 08:51:47 -07:00
|
|
|
|
2022-06-29 14:19:16 -07:00
|
|
|
|
2024-05-13 08:51:47 -07:00
|
|
|
|
2022-06-29 14:19:16 -07:00
|
|
|
|
2022-06-29 14:19:15 -07:00
|
|
|
|
2018-07-24 10:33:31 -06:00
|
|
|
|
|
|
|
|
|
2025-06-29 13:13:08 -07:00
|
|
|
|
2018-07-24 10:33:31 -06:00
|
|
|
|
2018-11-02 09:25:22 -06:00
|
|
|
|
2018-07-24 10:33:31 -06:00
|
|
|
|
2023-08-02 15:21:50 -07:00
|
|
|
|
2018-07-24 10:33:31 -06:00
|
|
|
|
|
|
|
|
|
2018-11-02 09:25:22 -06:00
|
|
|
|
|
|
|
|
|
2018-07-24 10:33:31 -06:00
|
|
|
|
|
|
|
|
|
2025-06-29 13:13:08 -07:00
|
|
|
|
2025-06-29 13:13:10 -07:00
|
|
|
|
2018-07-24 10:33:31 -06:00
|
|
|
|
2018-11-02 09:25:22 -06:00
|
|
|
|
2018-07-24 10:33:31 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-29 13:13:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-11-13 01:19:47 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-29 13:13:10 -07:00
|
|
|
|
2025-11-13 01:19:47 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-29 13:13:10 -07:00
|
|
|
|
2025-11-13 01:19:47 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-29 13:13:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-18 14:34:04 +01:00
|
|
|
|
2025-06-29 13:13:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-29 13:13:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-02-21 16:37:42 -08:00
|
|
|
|
2025-11-13 01:04:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-29 13:13:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-24 10:33:31 -06:00
|
|
|
|
2025-05-20 15:08:57 -04:00
|
|
|
|
|
|
|
|
|
2018-07-24 10:33:27 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-12 14:26:55 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-24 10:33:27 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-20 15:08:57 -04:00
|
|
|
|
|
|
|
|
|
2018-07-24 10:33:27 -06:00
|
|
|
|
2025-06-29 13:13:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-24 10:33:31 -06:00
|
|
|
|
2025-06-29 13:13:10 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-24 10:33:31 -06:00
|
|
|
|
|
|
|
|
|
2025-06-29 13:13:19 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-29 13:13:10 -07:00
|
|
|
|
2018-07-24 10:33:27 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-15 14:44:09 -08:00
|
|
|
|
2018-07-24 10:33:27 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
drm/msm/gpu: fix parameters in function msm_gpu_crashstate_capture
When CONFIG_DEV_COREDUMP isn't defined msm_gpu_crashstate_capture
doesn't pass the correct parameters.
drivers/gpu/drm/msm/msm_gpu.c: In function ‘recover_worker’:
drivers/gpu/drm/msm/msm_gpu.c:479:34: error: passing argument 2 of ‘msm_gpu_crashstate_capture’ from incompatible pointer type [-Werror=incompatible-pointer-types]
msm_gpu_crashstate_capture(gpu, submit, comm, cmd);
^~~~~~
drivers/gpu/drm/msm/msm_gpu.c:388:13: note: expected ‘char *’ but argument is of type ‘struct msm_gem_submit *’
static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, char *comm,
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/msm_gpu.c:479:2: error: too many arguments to function ‘msm_gpu_crashstate_capture’
msm_gpu_crashstate_capture(gpu, submit, comm, cmd);
^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/msm_gpu.c:388:13: note: declared here
static void msm_gpu_crashstate_capture(struct msm_gpu *gpu, char *comm,
In current code the function msm_gpu_crashstate_capture parameters.
Fixes: cdb95931dea3 ("drm/msm/gpu: Add the buffer objects from the submit to the crash dump")
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-By: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
2018-07-31 22:45:32 +02:00
|
|
|
|
2025-05-20 15:08:57 -04:00
|
|
|
|
|
|
|
|
|
2018-07-24 10:33:27 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-24 14:20:38 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-13 10:17:18 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
2017-09-13 10:17:18 -04:00
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
2020-10-23 09:51:16 -07:00
|
|
|
|
|
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
2017-09-13 10:17:18 -04:00
|
|
|
|
2020-10-23 09:51:16 -07:00
|
|
|
|
|
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
2017-09-13 10:17:18 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-15 18:26:28 -04:00
|
|
|
|
2015-06-07 13:46:04 -04:00
|
|
|
|
2022-03-17 09:51:39 -07:00
|
|
|
|
|
|
|
|
|
2025-06-29 13:12:47 -07:00
|
|
|
|
2022-03-17 09:51:39 -07:00
|
|
|
|
|
|
|
|
|
2023-01-10 13:28:59 -08:00
|
|
|
|
|
|
|
|
|
2022-03-17 09:51:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-17 09:51:39 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-17 09:51:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-17 09:51:39 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-19 14:10:51 -07:00
|
|
|
|
2013-08-24 14:20:38 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-15 11:04:44 -04:00
|
|
|
|
2016-05-03 10:10:15 -04:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2018-07-24 10:33:26 -06:00
|
|
|
|
2026-01-27 16:33:34 +09:00
|
|
|
|
2025-07-20 18:42:31 -03:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2013-08-24 14:20:38 -04:00
|
|
|
|
2021-11-09 10:11:03 -08:00
|
|
|
|
2015-06-07 13:46:04 -04:00
|
|
|
|
2018-10-20 23:19:26 +05:30
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2017-09-15 11:04:44 -04:00
|
|
|
|
2019-04-16 16:13:28 -07:00
|
|
|
|
2023-11-17 07:24:28 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-07-24 10:33:26 -06:00
|
|
|
|
2023-11-17 07:24:28 -08:00
|
|
|
|
|
|
|
|
|
2025-07-20 18:42:31 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-29 13:13:06 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-07-20 18:42:31 -03:00
|
|
|
|
2025-06-29 13:13:06 -07:00
|
|
|
|
2025-07-20 18:42:31 -03:00
|
|
|
|
2025-06-29 13:13:06 -07:00
|
|
|
|
|
|
|
|
|
2025-06-29 13:13:19 -07:00
|
|
|
|
2025-06-29 13:13:06 -07:00
|
|
|
|
2018-07-24 10:33:26 -06:00
|
|
|
|
2026-01-27 16:33:34 +09:00
|
|
|
|
|
|
|
|
|
2023-11-17 07:24:28 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-01 08:16:12 -08:00
|
|
|
|
2023-11-17 07:24:28 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-15 11:04:44 -04:00
|
|
|
|
2017-09-13 10:17:18 -04:00
|
|
|
|
2018-07-24 10:33:27 -06:00
|
|
|
|
|
|
|
|
|
2025-05-20 15:08:57 -04:00
|
|
|
|
2018-07-24 10:33:27 -06:00
|
|
|
|
2026-01-27 16:33:34 +09:00
|
|
|
|
|
|
|
|
|
2018-07-24 10:33:26 -06:00
|
|
|
|
|
|
|
|
|
2017-09-15 11:04:44 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-12-13 13:45:44 -07:00
|
|
|
|
2017-09-15 11:04:44 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-18 09:11:19 -07:00
|
|
|
|
2017-09-15 11:04:44 -04:00
|
|
|
|
2022-06-18 09:11:18 -07:00
|
|
|
|
2016-05-03 10:10:15 -04:00
|
|
|
|
|
|
|
|
|
2026-02-10 17:29:42 +01:00
|
|
|
|
|
|
|
|
|
2015-06-07 13:46:04 -04:00
|
|
|
|
2026-02-10 17:29:42 +01:00
|
|
|
|
2015-06-07 13:46:04 -04:00
|
|
|
|
2026-02-10 17:29:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2026-02-10 17:29:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-07 13:46:04 -04:00
|
|
|
|
2026-02-10 17:29:42 +01:00
|
|
|
|
2014-01-11 16:25:08 -05:00
|
|
|
|
2016-05-03 10:10:15 -04:00
|
|
|
|
2022-08-19 01:52:12 +05:30
|
|
|
|
2022-08-19 01:52:11 +05:30
|
|
|
|
2023-11-17 07:24:28 -08:00
|
|
|
|
2021-11-09 10:11:03 -08:00
|
|
|
|
2013-08-24 14:20:38 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-20 15:08:57 -04:00
|
|
|
|
2021-06-10 14:44:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-01-27 16:33:34 +09:00
|
|
|
|
2021-06-10 14:44:13 -07:00
|
|
|
|
2021-11-09 10:11:03 -08:00
|
|
|
|
2021-06-10 14:44:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2026-01-27 16:33:34 +09:00
|
|
|
|
|
|
|
|
|
2021-06-10 14:44:13 -07:00
|
|
|
|
2022-03-17 09:51:39 -07:00
|
|
|
|
2021-06-10 14:44:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-05-20 15:08:57 -04:00
|
|
|
|
2021-06-10 14:44:13 -07:00
|
|
|
|
|
|
|
|
|
2026-01-27 16:33:34 +09:00
|
|
|
|
|
|
|
|
|
2021-06-10 14:44:13 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-11-09 10:11:03 -08:00
|
|
|
|
2021-06-10 14:44:13 -07:00
|
|
|
|
|
|
|
|
|
2013-08-24 14:20:38 -04:00
|
|
|
|
|
|
|
|
|
2021-06-07 12:44:41 +02:00
|
|
|
|
2013-08-24 14:20:38 -04:00
|
|
|
|
2021-06-07 12:44:41 +02:00
|
|
|
|
2013-08-24 14:20:38 -04:00
|
|
|
|
|
|
|
|
|
2022-11-14 11:30:41 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
treewide: setup_timer() -> timer_setup()
This converts all remaining cases of the old setup_timer() API into using
timer_setup(), where the callback argument is the structure already
holding the struct timer_list. These should have no behavioral changes,
since they just change which pointer is passed into the callback with
the same available pointers after conversion. It handles the following
examples, in addition to some other variations.
Casting from unsigned long:
void my_callback(unsigned long data)
{
struct something *ptr = (struct something *)data;
...
}
...
setup_timer(&ptr->my_timer, my_callback, ptr);
and forced object casts:
void my_callback(struct something *ptr)
{
...
}
...
setup_timer(&ptr->my_timer, my_callback, (unsigned long)ptr);
become:
void my_callback(struct timer_list *t)
{
struct something *ptr = from_timer(ptr, t, my_timer);
...
}
...
timer_setup(&ptr->my_timer, my_callback, 0);
Direct function assignments:
void my_callback(unsigned long data)
{
struct something *ptr = (struct something *)data;
...
}
...
ptr->my_timer.function = my_callback;
have a temporary cast added, along with converting the args:
void my_callback(struct timer_list *t)
{
struct something *ptr = from_timer(ptr, t, my_timer);
...
}
...
ptr->my_timer.function = (TIMER_FUNC_TYPE)my_callback;
And finally, callbacks without a data assignment:
void my_callback(unsigned long data)
{
...
}
...
setup_timer(&ptr->my_timer, my_callback, 0);
have their argument renamed to verify they're unused during conversion:
void my_callback(struct timer_list *unused)
{
...
}
...
timer_setup(&ptr->my_timer, my_callback, 0);
The conversion is done with the following Coccinelle script:
spatch --very-quiet --all-includes --include-headers \
-I ./arch/x86/include -I ./arch/x86/include/generated \
-I ./include -I ./arch/x86/include/uapi \
-I ./arch/x86/include/generated/uapi -I ./include/uapi \
-I ./include/generated/uapi --include ./include/linux/kconfig.h \
--dir . \
--cocci-file ~/src/data/timer_setup.cocci
@fix_address_of@
expression e;
@@
setup_timer(
-&(e)
+&e
, ...)
// Update any raw setup_timer() usages that have a NULL callback, but
// would otherwise match change_timer_function_usage, since the latter
// will update all function assignments done in the face of a NULL
// function initialization in setup_timer().
@change_timer_function_usage_NULL@
expression _E;
identifier _timer;
type _cast_data;
@@
(
-setup_timer(&_E->_timer, NULL, _E);
+timer_setup(&_E->_timer, NULL, 0);
|
-setup_timer(&_E->_timer, NULL, (_cast_data)_E);
+timer_setup(&_E->_timer, NULL, 0);
|
-setup_timer(&_E._timer, NULL, &_E);
+timer_setup(&_E._timer, NULL, 0);
|
-setup_timer(&_E._timer, NULL, (_cast_data)&_E);
+timer_setup(&_E._timer, NULL, 0);
)
@change_timer_function_usage@
expression _E;
identifier _timer;
struct timer_list _stl;
identifier _callback;
type _cast_func, _cast_data;
@@
(
-setup_timer(&_E->_timer, _callback, _E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, &_callback, _E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, _callback, (_cast_data)_E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, &_callback, (_cast_data)_E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, (_cast_func)_callback, _E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, (_cast_func)&_callback, _E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, (_cast_func)_callback, (_cast_data)_E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, (_cast_func)&_callback, (_cast_data)_E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E._timer, _callback, (_cast_data)_E);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, _callback, (_cast_data)&_E);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, &_callback, (_cast_data)_E);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, &_callback, (_cast_data)&_E);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, (_cast_func)_callback, (_cast_data)_E);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, (_cast_func)_callback, (_cast_data)&_E);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, (_cast_func)&_callback, (_cast_data)_E);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, (_cast_func)&_callback, (_cast_data)&_E);
+timer_setup(&_E._timer, _callback, 0);
|
_E->_timer@_stl.function = _callback;
|
_E->_timer@_stl.function = &_callback;
|
_E->_timer@_stl.function = (_cast_func)_callback;
|
_E->_timer@_stl.function = (_cast_func)&_callback;
|
_E._timer@_stl.function = _callback;
|
_E._timer@_stl.function = &_callback;
|
_E._timer@_stl.function = (_cast_func)_callback;
|
_E._timer@_stl.function = (_cast_func)&_callback;
)
// callback(unsigned long arg)
@change_callback_handle_cast
depends on change_timer_function_usage@
identifier change_timer_function_usage._callback;
identifier change_timer_function_usage._timer;
type _origtype;
identifier _origarg;
type _handletype;
identifier _handle;
@@
void _callback(
-_origtype _origarg
+struct timer_list *t
)
{
(
... when != _origarg
_handletype *_handle =
-(_handletype *)_origarg;
+from_timer(_handle, t, _timer);
... when != _origarg
|
... when != _origarg
_handletype *_handle =
-(void *)_origarg;
+from_timer(_handle, t, _timer);
... when != _origarg
|
... when != _origarg
_handletype *_handle;
... when != _handle
_handle =
-(_handletype *)_origarg;
+from_timer(_handle, t, _timer);
... when != _origarg
|
... when != _origarg
_handletype *_handle;
... when != _handle
_handle =
-(void *)_origarg;
+from_timer(_handle, t, _timer);
... when != _origarg
)
}
// callback(unsigned long arg) without existing variable
@change_callback_handle_cast_no_arg
depends on change_timer_function_usage &&
!change_callback_handle_cast@
identifier change_timer_function_usage._callback;
identifier change_timer_function_usage._timer;
type _origtype;
identifier _origarg;
type _handletype;
@@
void _callback(
-_origtype _origarg
+struct timer_list *t
)
{
+ _handletype *_origarg = from_timer(_origarg, t, _timer);
+
... when != _origarg
- (_handletype *)_origarg
+ _origarg
... when != _origarg
}
// Avoid already converted callbacks.
@match_callback_converted
depends on change_timer_function_usage &&
!change_callback_handle_cast &&
!change_callback_handle_cast_no_arg@
identifier change_timer_function_usage._callback;
identifier t;
@@
void _callback(struct timer_list *t)
{ ... }
// callback(struct something *handle)
@change_callback_handle_arg
depends on change_timer_function_usage &&
!match_callback_converted &&
!change_callback_handle_cast &&
!change_callback_handle_cast_no_arg@
identifier change_timer_function_usage._callback;
identifier change_timer_function_usage._timer;
type _handletype;
identifier _handle;
@@
void _callback(
-_handletype *_handle
+struct timer_list *t
)
{
+ _handletype *_handle = from_timer(_handle, t, _timer);
...
}
// If change_callback_handle_arg ran on an empty function, remove
// the added handler.
@unchange_callback_handle_arg
depends on change_timer_function_usage &&
change_callback_handle_arg@
identifier change_timer_function_usage._callback;
identifier change_timer_function_usage._timer;
type _handletype;
identifier _handle;
identifier t;
@@
void _callback(struct timer_list *t)
{
- _handletype *_handle = from_timer(_handle, t, _timer);
}
// We only want to refactor the setup_timer() data argument if we've found
// the matching callback. This undoes changes in change_timer_function_usage.
@unchange_timer_function_usage
depends on change_timer_function_usage &&
!change_callback_handle_cast &&
!change_callback_handle_cast_no_arg &&
!change_callback_handle_arg@
expression change_timer_function_usage._E;
identifier change_timer_function_usage._timer;
identifier change_timer_function_usage._callback;
type change_timer_function_usage._cast_data;
@@
(
-timer_setup(&_E->_timer, _callback, 0);
+setup_timer(&_E->_timer, _callback, (_cast_data)_E);
|
-timer_setup(&_E._timer, _callback, 0);
+setup_timer(&_E._timer, _callback, (_cast_data)&_E);
)
// If we fixed a callback from a .function assignment, fix the
// assignment cast now.
@change_timer_function_assignment
depends on change_timer_function_usage &&
(change_callback_handle_cast ||
change_callback_handle_cast_no_arg ||
change_callback_handle_arg)@
expression change_timer_function_usage._E;
identifier change_timer_function_usage._timer;
identifier change_timer_function_usage._callback;
type _cast_func;
typedef TIMER_FUNC_TYPE;
@@
(
_E->_timer.function =
-_callback
+(TIMER_FUNC_TYPE)_callback
;
|
_E->_timer.function =
-&_callback
+(TIMER_FUNC_TYPE)_callback
;
|
_E->_timer.function =
-(_cast_func)_callback;
+(TIMER_FUNC_TYPE)_callback
;
|
_E->_timer.function =
-(_cast_func)&_callback
+(TIMER_FUNC_TYPE)_callback
;
|
_E._timer.function =
-_callback
+(TIMER_FUNC_TYPE)_callback
;
|
_E._timer.function =
-&_callback;
+(TIMER_FUNC_TYPE)_callback
;
|
_E._timer.function =
-(_cast_func)_callback
+(TIMER_FUNC_TYPE)_callback
;
|
_E._timer.function =
-(_cast_func)&_callback
+(TIMER_FUNC_TYPE)_callback
;
)
// Sometimes timer functions are called directly. Replace matched args.
@change_timer_function_calls
depends on change_timer_function_usage &&
(change_callback_handle_cast ||
change_callback_handle_cast_no_arg ||
change_callback_handle_arg)@
expression _E;
identifier change_timer_function_usage._timer;
identifier change_timer_function_usage._callback;
type _cast_data;
@@
_callback(
(
-(_cast_data)_E
+&_E->_timer
|
-(_cast_data)&_E
+&_E._timer
|
-_E
+&_E->_timer
)
)
// If a timer has been configured without a data argument, it can be
// converted without regard to the callback argument, since it is unused.
@match_timer_function_unused_data@
expression _E;
identifier _timer;
identifier _callback;
@@
(
-setup_timer(&_E->_timer, _callback, 0);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, _callback, 0L);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, _callback, 0UL);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E._timer, _callback, 0);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, _callback, 0L);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, _callback, 0UL);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_timer, _callback, 0);
+timer_setup(&_timer, _callback, 0);
|
-setup_timer(&_timer, _callback, 0L);
+timer_setup(&_timer, _callback, 0);
|
-setup_timer(&_timer, _callback, 0UL);
+timer_setup(&_timer, _callback, 0);
|
-setup_timer(_timer, _callback, 0);
+timer_setup(_timer, _callback, 0);
|
-setup_timer(_timer, _callback, 0L);
+timer_setup(_timer, _callback, 0);
|
-setup_timer(_timer, _callback, 0UL);
+timer_setup(_timer, _callback, 0);
)
@change_callback_unused_data
depends on match_timer_function_unused_data@
identifier match_timer_function_unused_data._callback;
type _origtype;
identifier _origarg;
@@
void _callback(
-_origtype _origarg
+struct timer_list *unused
)
{
... when != _origarg
}
Signed-off-by: Kees Cook <keescook@chromium.org>
2017-10-16 14:43:17 -07:00
|
|
|
|
2013-08-24 14:20:38 -04:00
|
|
|
|
2025-05-09 07:51:14 +02:00
|
|
|
|
2013-09-11 17:14:30 -04:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
|
|
|
|
|
2013-08-24 14:20:38 -04:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2013-08-24 14:20:38 -04:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2022-11-14 11:30:41 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-24 14:20:38 -04:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2022-11-14 11:30:41 -08:00
|
|
|
|
2018-10-20 23:19:26 +05:30
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2018-10-20 23:19:26 +05:30
|
|
|
|
2013-09-03 07:12:03 -04:00
|
|
|
|
2018-10-20 23:19:26 +05:30
|
|
|
|
2022-04-11 14:58:31 -07:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2020-10-19 14:10:51 -07:00
|
|
|
|
2013-08-24 14:20:38 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-04-11 14:58:31 -07:00
|
|
|
|
2013-08-24 14:20:38 -04:00
|
|
|
|
2013-09-11 17:14:30 -04:00
|
|
|
|
|
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
2013-08-24 14:20:38 -04:00
|
|
|
|
|
|
|
|
|
2014-05-30 14:49:43 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 15:36:33 -05:00
|
|
|
|
|
|
|
|
|
2014-05-30 14:49:43 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-02-10 15:36:33 -05:00
|
|
|
|
2014-05-30 14:49:43 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-02 09:25:21 -06:00
|
|
|
|
|
|
|
|
|
2016-03-16 16:07:38 -04:00
|
|
|
|
2018-11-02 09:25:21 -06:00
|
|
|
|
|
|
|
|
|
2022-06-09 10:42:12 -07:00
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
2016-03-16 16:07:38 -04:00
|
|
|
|
2018-11-02 09:25:21 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-09 10:42:12 -07:00
|
|
|
|
|
|
|
|
|
2018-11-02 09:25:21 -06:00
|
|
|
|
|
|
|
|
|
2022-06-09 10:42:12 -07:00
|
|
|
|
2018-11-02 09:25:21 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-09 10:42:12 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-02 09:25:21 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-27 18:06:11 -07:00
|
|
|
|
2016-03-16 16:07:38 -04:00
|
|
|
|
2017-02-10 15:36:33 -05:00
|
|
|
|
2020-10-23 09:51:17 -07:00
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
2020-10-23 09:51:17 -07:00
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
2020-10-23 09:51:17 -07:00
|
|
|
|
drm/msm: Devfreq tuning
This adds a few things to try and make frequency scaling better match
the workload:
1) Longer polling interval to avoid whip-lashing between too-high and
too-low frequencies in certain workloads, like mobile games which
throttle themselves to 30fps.
Previously our polling interval was short enough to let things
ramp down to minimum freq in the "off" frame, but long enough to
not react quickly enough when rendering started on the next frame,
leading to uneven frame times. (Ie. rather than a consistent 33ms
it would alternate between 16/33/48ms.)
2) Awareness of when the GPU is active vs idle. Since we know when
the GPU is active vs idle, we can clamp the frequency down to the
minimum while it is idle. (If it is idle for long enough, then
the autosuspend delay will eventually kick in and power down the
GPU.)
Since devfreq has no knowledge of powered-but-idle, this takes a
small bit of trickery to maintain a "fake" frequency while idle.
This, combined with the longer polling period allows devfreq to
arrive at a reasonable "active" frequency, while still clamping
to minimum freq when idle to reduce power draw.
3) Boost. Because simple_ondemand needs to see a certain threshold
of busyness to ramp up, we could end up needing multiple polling
cycles before it reacts appropriately on interactive workloads
(ex. scrolling a web page after reading for some time), on top
of the already lengthened polling interval, when we see a idle
to active transition after a period of idle time we boost the
frequency that we return to.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20210726144653.2180096-4-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
2021-07-26 07:46:50 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-08-19 01:52:10 +05:30
|
|
|
|
drm/msm: Devfreq tuning
This adds a few things to try and make frequency scaling better match
the workload:
1) Longer polling interval to avoid whip-lashing between too-high and
too-low frequencies in certain workloads, like mobile games which
throttle themselves to 30fps.
Previously our polling interval was short enough to let things
ramp down to minimum freq in the "off" frame, but long enough to
not react quickly enough when rendering started on the next frame,
leading to uneven frame times. (Ie. rather than a consistent 33ms
it would alternate between 16/33/48ms.)
2) Awareness of when the GPU is active vs idle. Since we know when
the GPU is active vs idle, we can clamp the frequency down to the
minimum while it is idle. (If it is idle for long enough, then
the autosuspend delay will eventually kick in and power down the
GPU.)
Since devfreq has no knowledge of powered-but-idle, this takes a
small bit of trickery to maintain a "fake" frequency while idle.
This, combined with the longer polling period allows devfreq to
arrive at a reasonable "active" frequency, while still clamping
to minimum freq when idle to reduce power draw.
3) Boost. Because simple_ondemand needs to see a certain threshold
of busyness to ramp up, we could end up needing multiple polling
cycles before it reacts appropriately on interactive workloads
(ex. scrolling a web page after reading for some time), on top
of the already lengthened polling interval, when we see a idle
to active transition after a period of idle time we boost the
frequency that we return to.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20210726144653.2180096-4-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
2021-07-26 07:46:50 -07:00
|
|
|
|
2022-08-19 01:52:10 +05:30
|
|
|
|
|
|
|
|
|
drm/msm: Devfreq tuning
This adds a few things to try and make frequency scaling better match
the workload:
1) Longer polling interval to avoid whip-lashing between too-high and
too-low frequencies in certain workloads, like mobile games which
throttle themselves to 30fps.
Previously our polling interval was short enough to let things
ramp down to minimum freq in the "off" frame, but long enough to
not react quickly enough when rendering started on the next frame,
leading to uneven frame times. (Ie. rather than a consistent 33ms
it would alternate between 16/33/48ms.)
2) Awareness of when the GPU is active vs idle. Since we know when
the GPU is active vs idle, we can clamp the frequency down to the
minimum while it is idle. (If it is idle for long enough, then
the autosuspend delay will eventually kick in and power down the
GPU.)
Since devfreq has no knowledge of powered-but-idle, this takes a
small bit of trickery to maintain a "fake" frequency while idle.
This, combined with the longer polling period allows devfreq to
arrive at a reasonable "active" frequency, while still clamping
to minimum freq when idle to reduce power draw.
3) Boost. Because simple_ondemand needs to see a certain threshold
of busyness to ramp up, we could end up needing multiple polling
cycles before it reacts appropriately on interactive workloads
(ex. scrolling a web page after reading for some time), on top
of the already lengthened polling interval, when we see a idle
to active transition after a period of idle time we boost the
frequency that we return to.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20210726144653.2180096-4-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
2021-07-26 07:46:50 -07:00
|
|
|
|
2022-08-19 01:52:10 +05:30
|
|
|
|
2022-06-08 09:13:34 -07:00
|
|
|
|
2020-10-23 09:51:17 -07:00
|
|
|
|
2016-03-16 16:07:38 -04:00
|
|
|
|
|
|
|
|
|
2016-03-15 18:26:28 -04:00
|
|
|
|
2015-06-07 13:46:04 -04:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2015-06-07 13:46:04 -04:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2017-10-20 11:07:01 -06:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2015-06-07 13:46:04 -04:00
|
|
|
|
2020-10-23 09:51:16 -07:00
|
|
|
|
|
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
2020-10-23 09:51:16 -07:00
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
2020-10-23 09:51:16 -07:00
|
|
|
|
|
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
2020-10-23 09:51:16 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-27 18:06:14 -07:00
|
|
|
|
2018-11-02 09:25:21 -06:00
|
|
|
|
2020-10-23 09:51:16 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-07 13:46:04 -04:00
|
|
|
|
|
|
|
|
|
2022-01-08 10:09:10 -08:00
|
|
|
|
|
|
|
|
|
2015-06-07 13:46:04 -04:00
|
|
|
|
|
|
|
|
|
2020-10-19 14:10:51 -07:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
2013-09-14 14:01:55 -04:00
|
|
|
|
2016-03-15 18:26:28 -04:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-06-18 09:11:18 -07:00
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
2020-10-19 14:10:51 -07:00
|
|
|
|
2014-05-30 14:49:43 -04:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-17 15:01:37 -07:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
2024-01-09 10:22:17 -08:00
|
|
|
|
|
|
|
|
|
2017-02-10 15:36:33 -05:00
|
|
|
|
|
|
|
|
|
2023-08-10 14:31:41 -07:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2024-01-09 10:22:17 -08:00
|
|
|
|
|
|
|
|
|
2014-05-30 14:49:43 -04:00
|
|
|
|
|
|
|
|
|
2020-10-23 09:51:17 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
2020-10-23 09:51:17 -07:00
|
|
|
|
2021-07-26 07:43:58 -07:00
|
|
|
|
2020-10-23 09:51:17 -07:00
|
|
|
|
drm/msm: Devfreq tuning
This adds a few things to try and make frequency scaling better match
the workload:
1) Longer polling interval to avoid whip-lashing between too-high and
too-low frequencies in certain workloads, like mobile games which
throttle themselves to 30fps.
Previously our polling interval was short enough to let things
ramp down to minimum freq in the "off" frame, but long enough to
not react quickly enough when rendering started on the next frame,
leading to uneven frame times. (Ie. rather than a consistent 33ms
it would alternate between 16/33/48ms.)
2) Awareness of when the GPU is active vs idle. Since we know when
the GPU is active vs idle, we can clamp the frequency down to the
minimum while it is idle. (If it is idle for long enough, then
the autosuspend delay will eventually kick in and power down the
GPU.)
Since devfreq has no knowledge of powered-but-idle, this takes a
small bit of trickery to maintain a "fake" frequency while idle.
This, combined with the longer polling period allows devfreq to
arrive at a reasonable "active" frequency, while still clamping
to minimum freq when idle to reduce power draw.
3) Boost. Because simple_ondemand needs to see a certain threshold
of busyness to ramp up, we could end up needing multiple polling
cycles before it reacts appropriately on interactive workloads
(ex. scrolling a web page after reading for some time), on top
of the already lengthened polling interval, when we see a idle
to active transition after a period of idle time we boost the
frequency that we return to.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20210726144653.2180096-4-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
2021-07-26 07:46:50 -07:00
|
|
|
|
|
|
|
|
|
2022-08-19 01:52:10 +05:30
|
|
|
|
|
|
|
|
|
drm/msm: Devfreq tuning
This adds a few things to try and make frequency scaling better match
the workload:
1) Longer polling interval to avoid whip-lashing between too-high and
too-low frequencies in certain workloads, like mobile games which
throttle themselves to 30fps.
Previously our polling interval was short enough to let things
ramp down to minimum freq in the "off" frame, but long enough to
not react quickly enough when rendering started on the next frame,
leading to uneven frame times. (Ie. rather than a consistent 33ms
it would alternate between 16/33/48ms.)
2) Awareness of when the GPU is active vs idle. Since we know when
the GPU is active vs idle, we can clamp the frequency down to the
minimum while it is idle. (If it is idle for long enough, then
the autosuspend delay will eventually kick in and power down the
GPU.)
Since devfreq has no knowledge of powered-but-idle, this takes a
small bit of trickery to maintain a "fake" frequency while idle.
This, combined with the longer polling period allows devfreq to
arrive at a reasonable "active" frequency, while still clamping
to minimum freq when idle to reduce power draw.
3) Boost. Because simple_ondemand needs to see a certain threshold
of busyness to ramp up, we could end up needing multiple polling
cycles before it reacts appropriately on interactive workloads
(ex. scrolling a web page after reading for some time), on top
of the already lengthened polling interval, when we see a idle
to active transition after a period of idle time we boost the
frequency that we return to.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20210726144653.2180096-4-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
2021-07-26 07:46:50 -07:00
|
|
|
|
2022-08-19 01:52:10 +05:30
|
|
|
|
drm/msm: Devfreq tuning
This adds a few things to try and make frequency scaling better match
the workload:
1) Longer polling interval to avoid whip-lashing between too-high and
too-low frequencies in certain workloads, like mobile games which
throttle themselves to 30fps.
Previously our polling interval was short enough to let things
ramp down to minimum freq in the "off" frame, but long enough to
not react quickly enough when rendering started on the next frame,
leading to uneven frame times. (Ie. rather than a consistent 33ms
it would alternate between 16/33/48ms.)
2) Awareness of when the GPU is active vs idle. Since we know when
the GPU is active vs idle, we can clamp the frequency down to the
minimum while it is idle. (If it is idle for long enough, then
the autosuspend delay will eventually kick in and power down the
GPU.)
Since devfreq has no knowledge of powered-but-idle, this takes a
small bit of trickery to maintain a "fake" frequency while idle.
This, combined with the longer polling period allows devfreq to
arrive at a reasonable "active" frequency, while still clamping
to minimum freq when idle to reduce power draw.
3) Boost. Because simple_ondemand needs to see a certain threshold
of busyness to ramp up, we could end up needing multiple polling
cycles before it reacts appropriately on interactive workloads
(ex. scrolling a web page after reading for some time), on top
of the already lengthened polling interval, when we see a idle
to active transition after a period of idle time we boost the
frequency that we return to.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20210726144653.2180096-4-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
2021-07-26 07:46:50 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-17 15:01:37 -07:00
|
|
|
|
2024-10-03 18:12:51 +02:00
|
|
|
|
2015-06-07 13:46:04 -04:00
|
|
|
|
2023-08-10 14:31:41 -07:00
|
|
|
|
2024-01-09 10:22:17 -08:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-07 10:02:56 -07:00
|
|
|
|
|
|
|
|
|
2019-07-25 10:53:55 -06:00
|
|
|
|
2017-03-07 10:02:56 -07:00
|
|
|
|
2018-08-06 11:33:21 -06:00
|
|
|
|
2017-03-07 10:02:56 -07:00
|
|
|
|
2018-08-06 11:33:21 -06:00
|
|
|
|
2017-03-07 10:02:56 -07:00
|
|
|
|
|
|
|
|
|
2018-08-06 11:33:21 -06:00
|
|
|
|
2017-03-07 10:02:56 -07:00
|
|
|
|
2018-08-06 11:33:21 -06:00
|
|
|
|
|
|
|
|
|
2017-03-07 10:02:56 -07:00
|
|
|
|
2018-08-06 11:33:21 -06:00
|
|
|
|
|
|
|
|
|
2017-03-07 10:02:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
2020-08-17 15:01:40 -07:00
|
|
|
|
2025-06-29 13:12:58 -07:00
|
|
|
|
2025-06-29 13:13:05 -07:00
|
|
|
|
|
|
|
|
|
2020-08-17 15:01:40 -07:00
|
|
|
|
2025-06-29 13:12:58 -07:00
|
|
|
|
|
|
|
|
|
2020-08-17 15:01:40 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-29 13:12:49 -07:00
|
|
|
|
2025-06-29 13:13:05 -07:00
|
|
|
|
2025-06-29 13:12:49 -07:00
|
|
|
|
2025-06-29 13:12:58 -07:00
|
|
|
|
2020-08-17 15:01:45 -07:00
|
|
|
|
2020-08-17 15:01:40 -07:00
|
|
|
|
2025-06-29 13:12:49 -07:00
|
|
|
|
2025-06-29 13:12:58 -07:00
|
|
|
|
2020-08-17 15:01:40 -07:00
|
|
|
|
2025-06-29 13:12:49 -07:00
|
|
|
|
2020-08-17 15:01:40 -07:00
|
|
|
|
|
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
2017-05-08 14:35:03 -06:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
2022-11-14 11:30:41 -08:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
2014-05-30 14:49:43 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-27 00:49:07 +02:00
|
|
|
|
2020-10-19 14:10:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-24 14:20:38 -04:00
|
|
|
|
2020-10-19 14:10:51 -07:00
|
|
|
|
|
|
|
|
|
drm/msm: Devfreq tuning
This adds a few things to try and make frequency scaling better match
the workload:
1) Longer polling interval to avoid whip-lashing between too-high and
too-low frequencies in certain workloads, like mobile games which
throttle themselves to 30fps.
Previously our polling interval was short enough to let things
ramp down to minimum freq in the "off" frame, but long enough to
not react quickly enough when rendering started on the next frame,
leading to uneven frame times. (Ie. rather than a consistent 33ms
it would alternate between 16/33/48ms.)
2) Awareness of when the GPU is active vs idle. Since we know when
the GPU is active vs idle, we can clamp the frequency down to the
minimum while it is idle. (If it is idle for long enough, then
the autosuspend delay will eventually kick in and power down the
GPU.)
Since devfreq has no knowledge of powered-but-idle, this takes a
small bit of trickery to maintain a "fake" frequency while idle.
This, combined with the longer polling period allows devfreq to
arrive at a reasonable "active" frequency, while still clamping
to minimum freq when idle to reduce power draw.
3) Boost. Because simple_ondemand needs to see a certain threshold
of busyness to ramp up, we could end up needing multiple polling
cycles before it reacts appropriately on interactive workloads
(ex. scrolling a web page after reading for some time), on top
of the already lengthened polling interval, when we see a idle
to active transition after a period of idle time we boost the
frequency that we return to.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Link: https://lore.kernel.org/r/20210726144653.2180096-4-robdclark@gmail.com
Signed-off-by: Rob Clark <robdclark@chromium.org>
2021-07-26 07:46:50 -07:00
|
|
|
|
2021-11-09 10:11:03 -08:00
|
|
|
|
2022-01-08 10:09:10 -08:00
|
|
|
|
2020-10-19 14:10:51 -07:00
|
|
|
|
|
|
|
|
|
2015-06-07 13:46:04 -04:00
|
|
|
|
2022-11-14 11:30:41 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
treewide: setup_timer() -> timer_setup()
This converts all remaining cases of the old setup_timer() API into using
timer_setup(), where the callback argument is the structure already
holding the struct timer_list. These should have no behavioral changes,
since they just change which pointer is passed into the callback with
the same available pointers after conversion. It handles the following
examples, in addition to some other variations.
Casting from unsigned long:
void my_callback(unsigned long data)
{
struct something *ptr = (struct something *)data;
...
}
...
setup_timer(&ptr->my_timer, my_callback, ptr);
and forced object casts:
void my_callback(struct something *ptr)
{
...
}
...
setup_timer(&ptr->my_timer, my_callback, (unsigned long)ptr);
become:
void my_callback(struct timer_list *t)
{
struct something *ptr = from_timer(ptr, t, my_timer);
...
}
...
timer_setup(&ptr->my_timer, my_callback, 0);
Direct function assignments:
void my_callback(unsigned long data)
{
struct something *ptr = (struct something *)data;
...
}
...
ptr->my_timer.function = my_callback;
have a temporary cast added, along with converting the args:
void my_callback(struct timer_list *t)
{
struct something *ptr = from_timer(ptr, t, my_timer);
...
}
...
ptr->my_timer.function = (TIMER_FUNC_TYPE)my_callback;
And finally, callbacks without a data assignment:
void my_callback(unsigned long data)
{
...
}
...
setup_timer(&ptr->my_timer, my_callback, 0);
have their argument renamed to verify they're unused during conversion:
void my_callback(struct timer_list *unused)
{
...
}
...
timer_setup(&ptr->my_timer, my_callback, 0);
The conversion is done with the following Coccinelle script:
spatch --very-quiet --all-includes --include-headers \
-I ./arch/x86/include -I ./arch/x86/include/generated \
-I ./include -I ./arch/x86/include/uapi \
-I ./arch/x86/include/generated/uapi -I ./include/uapi \
-I ./include/generated/uapi --include ./include/linux/kconfig.h \
--dir . \
--cocci-file ~/src/data/timer_setup.cocci
@fix_address_of@
expression e;
@@
setup_timer(
-&(e)
+&e
, ...)
// Update any raw setup_timer() usages that have a NULL callback, but
// would otherwise match change_timer_function_usage, since the latter
// will update all function assignments done in the face of a NULL
// function initialization in setup_timer().
@change_timer_function_usage_NULL@
expression _E;
identifier _timer;
type _cast_data;
@@
(
-setup_timer(&_E->_timer, NULL, _E);
+timer_setup(&_E->_timer, NULL, 0);
|
-setup_timer(&_E->_timer, NULL, (_cast_data)_E);
+timer_setup(&_E->_timer, NULL, 0);
|
-setup_timer(&_E._timer, NULL, &_E);
+timer_setup(&_E._timer, NULL, 0);
|
-setup_timer(&_E._timer, NULL, (_cast_data)&_E);
+timer_setup(&_E._timer, NULL, 0);
)
@change_timer_function_usage@
expression _E;
identifier _timer;
struct timer_list _stl;
identifier _callback;
type _cast_func, _cast_data;
@@
(
-setup_timer(&_E->_timer, _callback, _E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, &_callback, _E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, _callback, (_cast_data)_E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, &_callback, (_cast_data)_E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, (_cast_func)_callback, _E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, (_cast_func)&_callback, _E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, (_cast_func)_callback, (_cast_data)_E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, (_cast_func)&_callback, (_cast_data)_E);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E._timer, _callback, (_cast_data)_E);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, _callback, (_cast_data)&_E);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, &_callback, (_cast_data)_E);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, &_callback, (_cast_data)&_E);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, (_cast_func)_callback, (_cast_data)_E);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, (_cast_func)_callback, (_cast_data)&_E);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, (_cast_func)&_callback, (_cast_data)_E);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, (_cast_func)&_callback, (_cast_data)&_E);
+timer_setup(&_E._timer, _callback, 0);
|
_E->_timer@_stl.function = _callback;
|
_E->_timer@_stl.function = &_callback;
|
_E->_timer@_stl.function = (_cast_func)_callback;
|
_E->_timer@_stl.function = (_cast_func)&_callback;
|
_E._timer@_stl.function = _callback;
|
_E._timer@_stl.function = &_callback;
|
_E._timer@_stl.function = (_cast_func)_callback;
|
_E._timer@_stl.function = (_cast_func)&_callback;
)
// callback(unsigned long arg)
@change_callback_handle_cast
depends on change_timer_function_usage@
identifier change_timer_function_usage._callback;
identifier change_timer_function_usage._timer;
type _origtype;
identifier _origarg;
type _handletype;
identifier _handle;
@@
void _callback(
-_origtype _origarg
+struct timer_list *t
)
{
(
... when != _origarg
_handletype *_handle =
-(_handletype *)_origarg;
+from_timer(_handle, t, _timer);
... when != _origarg
|
... when != _origarg
_handletype *_handle =
-(void *)_origarg;
+from_timer(_handle, t, _timer);
... when != _origarg
|
... when != _origarg
_handletype *_handle;
... when != _handle
_handle =
-(_handletype *)_origarg;
+from_timer(_handle, t, _timer);
... when != _origarg
|
... when != _origarg
_handletype *_handle;
... when != _handle
_handle =
-(void *)_origarg;
+from_timer(_handle, t, _timer);
... when != _origarg
)
}
// callback(unsigned long arg) without existing variable
@change_callback_handle_cast_no_arg
depends on change_timer_function_usage &&
!change_callback_handle_cast@
identifier change_timer_function_usage._callback;
identifier change_timer_function_usage._timer;
type _origtype;
identifier _origarg;
type _handletype;
@@
void _callback(
-_origtype _origarg
+struct timer_list *t
)
{
+ _handletype *_origarg = from_timer(_origarg, t, _timer);
+
... when != _origarg
- (_handletype *)_origarg
+ _origarg
... when != _origarg
}
// Avoid already converted callbacks.
@match_callback_converted
depends on change_timer_function_usage &&
!change_callback_handle_cast &&
!change_callback_handle_cast_no_arg@
identifier change_timer_function_usage._callback;
identifier t;
@@
void _callback(struct timer_list *t)
{ ... }
// callback(struct something *handle)
@change_callback_handle_arg
depends on change_timer_function_usage &&
!match_callback_converted &&
!change_callback_handle_cast &&
!change_callback_handle_cast_no_arg@
identifier change_timer_function_usage._callback;
identifier change_timer_function_usage._timer;
type _handletype;
identifier _handle;
@@
void _callback(
-_handletype *_handle
+struct timer_list *t
)
{
+ _handletype *_handle = from_timer(_handle, t, _timer);
...
}
// If change_callback_handle_arg ran on an empty function, remove
// the added handler.
@unchange_callback_handle_arg
depends on change_timer_function_usage &&
change_callback_handle_arg@
identifier change_timer_function_usage._callback;
identifier change_timer_function_usage._timer;
type _handletype;
identifier _handle;
identifier t;
@@
void _callback(struct timer_list *t)
{
- _handletype *_handle = from_timer(_handle, t, _timer);
}
// We only want to refactor the setup_timer() data argument if we've found
// the matching callback. This undoes changes in change_timer_function_usage.
@unchange_timer_function_usage
depends on change_timer_function_usage &&
!change_callback_handle_cast &&
!change_callback_handle_cast_no_arg &&
!change_callback_handle_arg@
expression change_timer_function_usage._E;
identifier change_timer_function_usage._timer;
identifier change_timer_function_usage._callback;
type change_timer_function_usage._cast_data;
@@
(
-timer_setup(&_E->_timer, _callback, 0);
+setup_timer(&_E->_timer, _callback, (_cast_data)_E);
|
-timer_setup(&_E._timer, _callback, 0);
+setup_timer(&_E._timer, _callback, (_cast_data)&_E);
)
// If we fixed a callback from a .function assignment, fix the
// assignment cast now.
@change_timer_function_assignment
depends on change_timer_function_usage &&
(change_callback_handle_cast ||
change_callback_handle_cast_no_arg ||
change_callback_handle_arg)@
expression change_timer_function_usage._E;
identifier change_timer_function_usage._timer;
identifier change_timer_function_usage._callback;
type _cast_func;
typedef TIMER_FUNC_TYPE;
@@
(
_E->_timer.function =
-_callback
+(TIMER_FUNC_TYPE)_callback
;
|
_E->_timer.function =
-&_callback
+(TIMER_FUNC_TYPE)_callback
;
|
_E->_timer.function =
-(_cast_func)_callback;
+(TIMER_FUNC_TYPE)_callback
;
|
_E->_timer.function =
-(_cast_func)&_callback
+(TIMER_FUNC_TYPE)_callback
;
|
_E._timer.function =
-_callback
+(TIMER_FUNC_TYPE)_callback
;
|
_E._timer.function =
-&_callback;
+(TIMER_FUNC_TYPE)_callback
;
|
_E._timer.function =
-(_cast_func)_callback
+(TIMER_FUNC_TYPE)_callback
;
|
_E._timer.function =
-(_cast_func)&_callback
+(TIMER_FUNC_TYPE)_callback
;
)
// Sometimes timer functions are called directly. Replace matched args.
@change_timer_function_calls
depends on change_timer_function_usage &&
(change_callback_handle_cast ||
change_callback_handle_cast_no_arg ||
change_callback_handle_arg)@
expression _E;
identifier change_timer_function_usage._timer;
identifier change_timer_function_usage._callback;
type _cast_data;
@@
_callback(
(
-(_cast_data)_E
+&_E->_timer
|
-(_cast_data)&_E
+&_E._timer
|
-_E
+&_E->_timer
)
)
// If a timer has been configured without a data argument, it can be
// converted without regard to the callback argument, since it is unused.
@match_timer_function_unused_data@
expression _E;
identifier _timer;
identifier _callback;
@@
(
-setup_timer(&_E->_timer, _callback, 0);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, _callback, 0L);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E->_timer, _callback, 0UL);
+timer_setup(&_E->_timer, _callback, 0);
|
-setup_timer(&_E._timer, _callback, 0);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, _callback, 0L);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_E._timer, _callback, 0UL);
+timer_setup(&_E._timer, _callback, 0);
|
-setup_timer(&_timer, _callback, 0);
+timer_setup(&_timer, _callback, 0);
|
-setup_timer(&_timer, _callback, 0L);
+timer_setup(&_timer, _callback, 0);
|
-setup_timer(&_timer, _callback, 0UL);
+timer_setup(&_timer, _callback, 0);
|
-setup_timer(_timer, _callback, 0);
+timer_setup(_timer, _callback, 0);
|
-setup_timer(_timer, _callback, 0L);
+timer_setup(_timer, _callback, 0);
|
-setup_timer(_timer, _callback, 0UL);
+timer_setup(_timer, _callback, 0);
)
@change_callback_unused_data
depends on match_timer_function_unused_data@
identifier match_timer_function_unused_data._callback;
type _origtype;
identifier _origarg;
@@
void _callback(
-_origtype _origarg
+struct timer_list *unused
)
{
... when != _origarg
}
Signed-off-by: Kees Cook <keescook@chromium.org>
2017-10-16 14:43:17 -07:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
2014-05-30 14:49:43 -04:00
|
|
|
|
|
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
2022-01-06 02:26:59 +03:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-12-18 11:32:36 -07:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-02-26 00:51:28 +05:30
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
2018-10-20 23:19:26 +05:30
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-03-07 10:02:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
2017-01-30 11:30:58 -05:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-08-17 15:01:32 -07:00
|
|
|
|
2016-09-28 19:58:32 -04:00
|
|
|
|
2018-01-10 10:41:54 -07:00
|
|
|
|
|
|
|
|
|
2025-06-29 13:12:49 -07:00
|
|
|
|
2025-06-29 13:12:50 -07:00
|
|
|
|
2025-06-29 13:12:49 -07:00
|
|
|
|
2017-07-27 10:42:39 -06:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
2014-07-11 11:59:22 -04:00
|
|
|
|
2018-11-02 09:25:18 -06:00
|
|
|
|
|
|
|
|
|
2025-06-29 13:12:49 -07:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2017-10-20 11:06:56 -06:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
|
|
|
|
|
2018-10-20 23:19:26 +05:30
|
|
|
|
2017-10-20 11:06:56 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-11-07 15:35:52 -07:00
|
|
|
|
|
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
2017-08-03 13:50:48 +02:00
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
|
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-10-20 23:19:26 +05:30
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-03-03 16:52:16 -08:00
|
|
|
|
|
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-29 13:12:49 -07:00
|
|
|
|
2017-10-20 11:06:56 -06:00
|
|
|
|
2017-07-27 10:42:39 -06:00
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
|
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
|
|
|
|
|
2017-10-20 11:06:57 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|
2017-10-20 11:06:56 -06:00
|
|
|
|
2025-06-29 13:12:49 -07:00
|
|
|
|
2017-10-20 11:06:56 -06:00
|
|
|
|
2025-06-29 13:12:49 -07:00
|
|
|
|
2025-06-29 13:12:58 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-27 10:42:39 -06:00
|
|
|
|
2020-10-19 14:10:51 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-10-30 16:17:10 +05:30
|
|
|
|
2021-07-26 07:46:48 -07:00
|
|
|
|
2022-09-28 12:49:00 +05:30
|
|
|
|
|
|
|
|
|
2013-07-19 12:59:32 -04:00
|
|
|
|