Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4B15B215F6C for ; Mon, 25 Aug 2025 07:27:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756106852; cv=none; b=E6kXWSXAE7yEY91NTsRPpQRxQ6icXYbb1qfwTMazYuf1Sk+g+NQYWtVAa3srCMzZIfeYZGwu1AFrGOBU3paEwvqjBOHMe2eEL4htPY6reEy3Cd5dcUfJDnlGieEhkCZO+7o+KrLtyXwpqgpU1smGdkNowHrW837p92AB+4mHLIs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756106852; c=relaxed/simple; bh=hIiGmT5DQeUXhMyBICchrvgrrNZi+Oix0KhbnCYbqzg=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=LW4zJCORuAGrCdG6PWp4o4cZHeCd3T0mK1dsC2hEybWgM9Hg+QVsw9J4FM1FlxrWttAejodyTdMuhy99/Q2TSLVdXiL6WMK8Te0ufYWroTxDuDZoU2vtvyp0dKEU4s1LYewg0wu4Q8DnZCCxkl6IVPrt/7PbIIY7ceuOLRqaEEM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Roc3XQGb; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Roc3XQGb" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C1EE2C4CEED; Mon, 25 Aug 2025 07:27:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1756106852; bh=hIiGmT5DQeUXhMyBICchrvgrrNZi+Oix0KhbnCYbqzg=; h=Subject:To:Cc:From:Date:From; b=Roc3XQGbl+OI62H9t3Cil/zdWazS78OJWGWShkNIjMcI/0r4YBfa6IdL9dSukGpGb bYAI+6D7zY1BL4XyZGHX6KNGPTlVlGwLA66MtOJzh6FxSr1D/+B9voBDv5MMdlxQIX u2GDYMfrykuygybVFafxbgu0GApuStKQCNROoL0Y= Subject: FAILED: patch "[PATCH] x86/cpu/hygon: Add missing resctrl_cpu_detect() in bsp_init" failed to apply to 5.15-stable tree To: txpeng@tencent.com,bp@alien8.de,caelli@tencent.com,stable@kernel.org Cc: From: Date: Mon, 25 Aug 2025 09:27:17 +0200 Message-ID: <2025082517-crazily-renewed-62e6@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.15.y git checkout FETCH_HEAD git cherry-pick -x d8df126349dad855cdfedd6bbf315bad2e901c2f # git commit -s git send-email --to '' --in-reply-to '2025082517-crazily-renewed-62e6@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ From d8df126349dad855cdfedd6bbf315bad2e901c2f Mon Sep 17 00:00:00 2001 From: Tianxiang Peng Date: Mon, 23 Jun 2025 17:31:53 +0800 Subject: [PATCH] x86/cpu/hygon: Add missing resctrl_cpu_detect() in bsp_init helper Since 923f3a2b48bd ("x86/resctrl: Query LLC monitoring properties once during boot") resctrl_cpu_detect() has been moved from common CPU initialization code to the vendor-specific BSP init helper, while Hygon didn't put that call in their code. This triggers a division by 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. Add the missing resctrl_cpu_detect() in the Hygon BSP init helper. [ bp: Massage commit message. ] Fixes: 923f3a2b48bd ("x86/resctrl: Query LLC monitoring properties once during boot") Signed-off-by: Tianxiang Peng Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Hui Li Cc: Link: https://lore.kernel.org/20250623093153.3016937-1-txpeng@tencent.com diff --git a/arch/x86/kernel/cpu/hygon.c b/arch/x86/kernel/cpu/hygon.c index 2154f12766fb..1fda6c3a2b65 100644 --- a/arch/x86/kernel/cpu/hygon.c +++ b/arch/x86/kernel/cpu/hygon.c @@ -16,6 +16,7 @@ #include #include #include +#include #include "cpu.h" @@ -117,6 +118,8 @@ static void bsp_init_hygon(struct cpuinfo_x86 *c) x86_amd_ls_cfg_ssbd_mask = 1ULL << 10; } } + + resctrl_cpu_detect(c); } static void early_init_hygon(struct cpuinfo_x86 *c)