Commit b1bcdd40 authored by Tianci Yin's avatar Tianci Yin Committed by Alex Deucher

drm/amd/display: Disable migration to ensure consistency of per-CPU variable

[why]
Since the variable fpu_recursion_depth is per-CPU type, it has one copy
on each CPU, thread migration causes data consistency issue, then the
call trace shows up. And preemption disabling can't prevent migration.

[how]
Disable migration to ensure consistency of fpu_recursion_depth.
Reviewed-by: default avatarAurabindo Pillai <aurabindo.pillai@amd.com>
Signed-off-by: default avatarTianci Yin <tianci.yin@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent fc3888fe
...@@ -89,6 +89,7 @@ void dc_fpu_begin(const char *function_name, const int line) ...@@ -89,6 +89,7 @@ void dc_fpu_begin(const char *function_name, const int line)
if (*pcpu == 1) { if (*pcpu == 1) {
#if defined(CONFIG_X86) #if defined(CONFIG_X86)
migrate_disable();
kernel_fpu_begin(); kernel_fpu_begin();
#elif defined(CONFIG_PPC64) #elif defined(CONFIG_PPC64)
if (cpu_has_feature(CPU_FTR_VSX_COMP)) { if (cpu_has_feature(CPU_FTR_VSX_COMP)) {
...@@ -129,6 +130,7 @@ void dc_fpu_end(const char *function_name, const int line) ...@@ -129,6 +130,7 @@ void dc_fpu_end(const char *function_name, const int line)
if (*pcpu <= 0) { if (*pcpu <= 0) {
#if defined(CONFIG_X86) #if defined(CONFIG_X86)
kernel_fpu_end(); kernel_fpu_end();
migrate_enable();
#elif defined(CONFIG_PPC64) #elif defined(CONFIG_PPC64)
if (cpu_has_feature(CPU_FTR_VSX_COMP)) { if (cpu_has_feature(CPU_FTR_VSX_COMP)) {
disable_kernel_vsx(); disable_kernel_vsx();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment