mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 01:23:56 +02:00
On PREEMPT_RT kernels, vfree() can sleep because spin_lock is converted to rt_mutex. dml2_destroy() calls vfree() while inside an FPU-guarded region (preempt_count=2), which is illegal. dml2_wrapper_fpu.c is compiled with CC_FLAGS_FPU which defines _LINUX_FPU_COMPILATION_UNIT, making DC_RUN_WITH_PREEMPTION_ENABLED() resolve to a no-op. This prevents the macro from cycling FPU context off/on around vfree(). Move dml2_destroy() to dml2_wrapper.c (non-FPU compilation unit) where DC_RUN_WITH_PREEMPTION_ENABLED() properly cycles DC_FP_END/ DC_FP_START around vfree(). This pairs it with dml2_allocate_memory() which already lives there. Reviewed-by: Dillon Varone <dillon.varone@amd.com> Signed-off-by: Rafal Ostrowski <rafal.ostrowski@amd.com> Signed-off-by: Chenyu Chen <chen-yu.chen@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
||
|---|---|---|
| .. | ||
| dml21 | ||
| cmntypes.h | ||
| display_mode_core_structs.h | ||
| display_mode_core.c | ||
| display_mode_core.h | ||
| display_mode_lib_defines.h | ||
| display_mode_util.c | ||
| display_mode_util.h | ||
| dml_assert.h | ||
| dml_depedencies.h | ||
| dml_display_rq_dlg_calc.c | ||
| dml_display_rq_dlg_calc.h | ||
| dml_logging.h | ||
| dml2_dc_resource_mgmt.c | ||
| dml2_dc_resource_mgmt.h | ||
| dml2_dc_types.h | ||
| dml2_internal_types.h | ||
| dml2_mall_phantom.c | ||
| dml2_mall_phantom.h | ||
| dml2_policy.c | ||
| dml2_policy.h | ||
| dml2_translation_helper.c | ||
| dml2_translation_helper.h | ||
| dml2_utils.c | ||
| dml2_utils.h | ||
| dml2_wrapper_fpu.c | ||
| dml2_wrapper_fpu.h | ||
| dml2_wrapper.c | ||
| dml2_wrapper.h | ||
| Makefile | ||