Re: [PATCH RESEND] x86/cpu/hygon: fix missing resctrl_cpu_detect() in bsp_init helper
From: Borislav Petkov
Date: Mon Jun 23 2025 - 09:38:44 EST
On Mon, Jun 23, 2025 at 05:31:53PM +0800, Tianxiang Peng wrote:
> Since upstream commit 923f3a2b48bdccb6a1d1f0dd48de03de7ad936d9
> ("x86/resctrl: Query LLC monitoring properties once during boot"),
This commit is in 5.7.
You notice the issue only now because you were on an old kernel before and
moved to 5-something, which is >= 5.7?
> resctrl_cpu_detect() has been moved from common cpu initialization
> code to vendor-specific bsp init helper, while hygon didn't put
> that call in their code.
>
> This triggers div-zero fault during early booting stage on our
> machines with X86_FEATURE_CQM* supported, where
> get_rdt_mon_resources() tries to calculate mon_l3_config with
> uninitialized boot_cpu_data.x86_cache_occ_scale.
>
> Fix the missing resctrl_cpu_detect() in hygon bsp init helper.
>
> Signed-off-by: Tianxiang Peng <txpeng@xxxxxxxxxxx>
Your From: is Tianxiang Peng <luminosity1999@xxxxxxxxx> and that will appear
in git as author.
Do you want it to be the email address you have in the Signed-off-by instead?
I.e., your company.
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette