From mboxrd@z Thu Jan 1 00:00:00 1970 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 B80703ECBE3; Wed, 21 Jan 2026 18:35:05 +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=1769020505; cv=none; b=cAAO4VczMpT9yOKYdgBun2R/X7M60u4qB9Uh7fwO69PaZNhB8HmgmM+c3WvcalpJ1WMjGdpbjAII9YIkQ41aLI3SD46AQr0a6IdijXVFoZEQ/ikgxwYqYdcp6WEhX35y/pwvCq7OJIwMPTnd8Ek4e9kCBNvLB4V+x5YSKB0hMNw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769020505; c=relaxed/simple; bh=W7EvjXe7RW6r3dbu3h8N+accCqtIXfXmimRTJmYsIKE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=prJwRAiznhQL/YcOiPRgYb8e/mqO95aFW0+OMYkFbaNByTp/2vqtRQV89raUZ6R+R/i8wUlGH6KmpiHoE94gQ1lZ2HT+eCL4ElUeT2y8+uIsUc70AnY/ZaIXmRoRCftYgodgDcIL3n/5kAgc2ALD1h8ws6lMAk91xiX30xB5+lk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=qwlmdQFQ; 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="qwlmdQFQ" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C40DC4CEF1; Wed, 21 Jan 2026 18:35:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1769020505; bh=W7EvjXe7RW6r3dbu3h8N+accCqtIXfXmimRTJmYsIKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qwlmdQFQt3teD3gEkeHt8IHdT+h3YpuF/FvJgwAAfnHAFK7Os8gvIhwgseEJhZkNA C6aeF/pEuCgD35cQt+hd458DGemd0Bu7dSSl7q/GYo7nH7TXvYWppZPmNZScd2Jmwe dECcZAdTcz7GsSnNvl09zdyEbWGkxDpcZZBAUy8M= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Xiaochen Shen , "Borislav Petkov (AMD)" , Reinette Chatre Subject: [PATCH 6.18 135/198] x86/resctrl: Add missing resctrl initialization for Hygon Date: Wed, 21 Jan 2026 19:16:03 +0100 Message-ID: <20260121181423.406243306@linuxfoundation.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260121181418.537774329@linuxfoundation.org> References: <20260121181418.537774329@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Xiaochen Shen commit 6ee98aabdc700b5705e4f1833e2edc82a826b53b 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: d8df126349da ("x86/cpu/hygon: Add missing resctrl_cpu_detect() in bsp_init helper") Signed-off-by: Xiaochen Shen Signed-off-by: Borislav Petkov (AMD) Reviewed-by: Reinette Chatre Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20251209062650.1536952-2-shenxiaochen@open-hieco.net Signed-off-by: Greg Kroah-Hartman --- arch/x86/kernel/cpu/resctrl/core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/arch/x86/kernel/cpu/resctrl/core.c +++ b/arch/x86/kernel/cpu/resctrl/core.c @@ -818,7 +818,8 @@ static __init bool get_mem_config(void) if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) return __get_mem_config_intel(&hw_res->r_resctrl); - else if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) + else if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD || + boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) return __rdt_get_mem_config_amd(&hw_res->r_resctrl); return false; @@ -978,7 +979,8 @@ static __init void rdt_init_res_defs(voi { if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL) rdt_init_res_defs_intel(); - else if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) + else if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD || + boot_cpu_data.x86_vendor == X86_VENDOR_HYGON) rdt_init_res_defs_amd(); }