mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Moger, Babu" <babu.moger@amd.com>
To: "Luck, Tony" <tony.luck@intel.com>,
	"Yu, Fenghua" <fenghua.yu@intel.com>,
	"Chatre, Reinette" <reinette.chatre@intel.com>,
	Peter Newman <peternewman@google.com>,
	"x86@kernel.org" <x86@kernel.org>
Cc: Shaopeng Tan <tan.shaopeng@fujitsu.com>,
	James Morse <james.morse@arm.com>,
	Jamie Iles <quic_jiles@quicinc.com>,
	Randy Dunlap <rdunlap@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"patches@lists.linux.dev" <patches@lists.linux.dev>
Subject: Re: [PATCH] x86/resctrl: Fix unused variable warning in cache_alloc_hsw_probe()
Date: Wed, 1 Nov 2023 15:42:36 -0500	[thread overview]
Message-ID: <9e6a979a-48db-4b25-884f-ac8d4c2bb078@amd.com> (raw)
In-Reply-To: <SJ1PR11MB6083C14236AC0AFCB49DFB15FCA7A@SJ1PR11MB6083.namprd11.prod.outlook.com>


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

  reply	other threads:[~2023-11-01 20:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31 22:05 Tony Luck
2023-11-01  9:43 ` Bagas Sanjaya
2023-11-01 14:33   ` Luck, Tony
2023-11-01 20:26 ` Moger, Babu
2023-11-01 20:33   ` Luck, Tony
2023-11-01 20:42     ` Moger, Babu [this message]
2023-11-01 21:26       ` [PATCH v2] " Tony Luck
2023-11-02 13:02         ` Moger, Babu
2023-11-02 21:34         ` Reinette Chatre
2023-11-02 22:02           ` Luck, Tony
2023-11-02 22:23             ` Reinette Chatre
2023-11-02 22:50               ` Luck, Tony
2023-11-03 20:23                 ` Reinette Chatre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9e6a979a-48db-4b25-884f-ac8d4c2bb078@amd.com \
    --to=babu.moger@amd.com \
    --cc=fenghua.yu@intel.com \
    --cc=james.morse@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@lists.linux.dev \
    --cc=peternewman@google.com \
    --cc=quic_jiles@quicinc.com \
    --cc=rdunlap@infradead.org \
    --cc=reinette.chatre@intel.com \
    --cc=tan.shaopeng@fujitsu.com \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®