lkml.org 
[lkml]   [2023]   [Nov]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] x86/resctrl: Fix unused variable warning in cache_alloc_hsw_probe()
From

On 11/1/23 15:33, Luck, Tony wrote:
>>> if (wrmsr_safe(MSR_IA32_L3_CBM_BASE, max_cbm, 0))
>>> return;
>>>
>>> - rdmsr(MSR_IA32_L3_CBM_BASE, l, h);
>>> + rdmsrl(MSR_IA32_L3_CBM_BASE, l3_cbm_0);
>>
>> You are writing 32 bit and reading 64 bit. Why don't you change both to 64
>> bit?
>
> wrmsr_safe() writes all 64-bits ... just gets those bits as a pair
> of 32-bit arguments for the low and high halves.
>
> I could switch that to wrmsrl_safe() and change max_cbm to be "u64"
> to make write & read match. Would that be better?

Yes. That is better.
--
Thanks
Babu Moger

\
 
 \ /
  Last update: 2023-11-01 21:45    [W:0.059 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site