[<prev] [next>] [day] [month] [year] [list]
Message-ID: <170595042118.398.14799564036429215323.tip-bot2@tip-bot2>
Date: Mon, 22 Jan 2024 19:07:01 -0000
From: "tip-bot2 for Tony Luck" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Tony Luck <tony.luck@...el.com>, "Borislav Petkov (AMD)" <bp@...en8.de>,
Babu Moger <babu.moger@....com>, Reinette Chatre <reinette.chatre@...el.com>,
x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: x86/cache] x86/resctrl: Fix unused variable warning in
cache_alloc_hsw_probe()
The following commit has been merged into the x86/cache branch of tip:
Commit-ID: 1b908debf53ff3cf0e43e0fa51e7319a23518e6c
Gitweb: https://git.kernel.org/tip/1b908debf53ff3cf0e43e0fa51e7319a23518e6c
Author: Tony Luck <tony.luck@...el.com>
AuthorDate: Wed, 01 Nov 2023 14:26:15 -07:00
Committer: Borislav Petkov (AMD) <bp@...en8.de>
CommitterDate: Mon, 22 Jan 2024 19:54:54 +01:00
x86/resctrl: Fix unused variable warning in cache_alloc_hsw_probe()
In a "W=1" build gcc throws a warning:
arch/x86/kernel/cpu/resctrl/core.c: In function ‘cache_alloc_hsw_probe’:
arch/x86/kernel/cpu/resctrl/core.c:139:16: warning: variable ‘h’ set but not used
Switch from wrmsr_safe() to wrmsrl_safe(), and from rdmsr() to rdmsrl()
using a single u64 argument for the MSR value instead of the pair of u32
for the high and low halves.
Signed-off-by: Tony Luck <tony.luck@...el.com>
Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
Reviewed-by: Babu Moger <babu.moger@....com>
Acked-by: Reinette Chatre <reinette.chatre@...el.com>
Link: https://lore.kernel.org/r/ZULCd/TGJL9Dmncf@agluck-desk3
---
arch/x86/kernel/cpu/resctrl/core.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/cpu/resctrl/core.c b/arch/x86/kernel/cpu/resctrl/core.c
index 19e0681..d29ebe3 100644
--- a/arch/x86/kernel/cpu/resctrl/core.c
+++ b/arch/x86/kernel/cpu/resctrl/core.c
@@ -136,15 +136,15 @@ static inline void cache_alloc_hsw_probe(void)
{
struct rdt_hw_resource *hw_res = &rdt_resources_all[RDT_RESOURCE_L3];
struct rdt_resource *r = &hw_res->r_resctrl;
- u32 l, h, max_cbm = BIT_MASK(20) - 1;
+ u64 max_cbm = BIT_ULL_MASK(20) - 1, l3_cbm_0;
- if (wrmsr_safe(MSR_IA32_L3_CBM_BASE, max_cbm, 0))
+ if (wrmsrl_safe(MSR_IA32_L3_CBM_BASE, max_cbm))
return;
- rdmsr(MSR_IA32_L3_CBM_BASE, l, h);
+ rdmsrl(MSR_IA32_L3_CBM_BASE, l3_cbm_0);
/* If all the bits were set in MSR, return success */
- if (l != max_cbm)
+ if (l3_cbm_0 != max_cbm)
return;
hw_res->num_closid = 4;
Powered by blists - more mailing lists