Skip to content

Commit d390d3d

Browse files
shenxiaochenlanlanxiyiji
authored andcommitted
x86/resctrl: Add missing resctrl initialization for Hygon
commit 6ee98aa upstream. Hygon CPUs supporting Platform QoS features currently undergo partial resctrl initialization through resctrl_cpu_detect() in the Hygon BSP init helper and AMD/Hygon common initialization code. However, several critical data structures remain uninitialized for Hygon CPUs in the following paths: - get_mem_config()-> __rdt_get_mem_config_amd(): rdt_resource::membw,alloc_capable hw_res::num_closid - rdt_init_res_defs()->rdt_init_res_defs_amd(): rdt_resource::cache hw_res::msr_base,msr_update Add the missing AMD/Hygon common initialization to ensure proper Platform QoS functionality on Hygon CPUs. Fixes: d8df126 ("x86/cpu/hygon: Add missing resctrl_cpu_detect() in bsp_init helper") Signed-off-by: Xiaochen Shen <shenxiaochen@open-hieco.net> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Reviewed-by: Reinette Chatre <reinette.chatre@intel.com> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20251209062650.1536952-2-shenxiaochen@open-hieco.net Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> (cherry picked from commit a78dca14fb2b054d7b8b46bda1ea552bd1a88ffe) Signed-off-by: Wentao Guan <guanwentao@uniontech.com>
1 parent ab977b6 commit d390d3d

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • arch/x86/kernel/cpu/resctrl

arch/x86/kernel/cpu/resctrl/core.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,8 @@ static __init bool get_mem_config(void)
759759

760760
if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
761761
return __get_mem_config_intel(&hw_res->r_resctrl);
762-
else if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
762+
else if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD ||
763+
boot_cpu_data.x86_vendor == X86_VENDOR_HYGON)
763764
return __rdt_get_mem_config_amd(&hw_res->r_resctrl);
764765

765766
return false;
@@ -910,7 +911,8 @@ static __init void rdt_init_res_defs(void)
910911
{
911912
if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
912913
rdt_init_res_defs_intel();
913-
else if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD)
914+
else if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD ||
915+
boot_cpu_data.x86_vendor == X86_VENDOR_HYGON)
914916
rdt_init_res_defs_amd();
915917
}
916918

0 commit comments

Comments
 (0)