aboutsummaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorRodrigo Siqueira <[email protected]>2021-07-26 20:52:48 -0400
committerAlex Deucher <[email protected]>2021-08-05 21:17:59 -0400
commit0ea7ee8217012f1088ceae85634149d55e9052f9 (patch)
tree54046119a357b50eb41e97bb3b9906955bd2f2c9 /scripts/gdb/linux/utils.py
parent2d8471dc371f36fd6ba3b5a4716b39555169df3d (diff)
drm/amd/display: Add DC_FP helper to check FPU state
To fully isolate FPU operations in a single place, we must avoid situations where compilers spill FP values to registers due to FP enable in a specific C file. Note that even if we isolate all FPU functions in a single file and call its interface from other files, the compiler might enable the use of FPU before we call DC_FP_START. Nevertheless, it is the programmer's responsibility to invoke DC_FP_START/END in the correct place. To highlight situations where developers forgot to use the FP protection before calling the DC FPU interface functions, we introduce a helper that checks if the function is invoked under FP protection. If not, it will trigger a kernel warning. Changes cince V3: - Rebase Changes cince V2 (Christian): - Do not use this_cpu_* between get/put_cpu_ptr(). - In the kernel documentation, better describe restrictions. - Make dc_assert_fp_enabled trigger the ASSERT message. Changes since V1: - Remove fp_enable variables - Rename dc_is_fp_enabled to dc_assert_fp_enabled - Replace wrong variable type Cc: Harry Wentland <[email protected]> Cc: Anson Jacob <[email protected]> Cc: Christian König <[email protected]> Cc: Hersen Wu <[email protected]> Cc: Aric Cyr <[email protected]> Cc: Jun Lei <[email protected]> Cc: Dmytro Laktyushkin <[email protected]> Cc: Qingqing Zhuo <[email protected]> Reported-by: kernel test robot <[email protected]> Signed-off-by: Rodrigo Siqueira <[email protected]> Reviewed-by: Christian König <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'scripts/gdb/linux/utils.py')
0 files changed, 0 insertions, 0 deletions