linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hui Su <suhui@zeku.com>
To: fenghua.yu@intel.com, reinette.chatre@intel.com,
	tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	x86@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org
Cc: Hui Su <suhui@zeku.com>
Subject: [PATCH] x86/intel_rdt: use __this_cpu_read in pseudo_lock_fn()
Date: Fri, 23 Jul 2021 10:33:42 +0800	[thread overview]
Message-ID: <20210723023342.3015-1-suhui@zeku.com> (raw)

The code is executed with interrupts disabled,
so it's safe to use __this_cpu_read().

Signed-off-by: Hui Su <suhui@zeku.com>
---
 arch/x86/kernel/cpu/resctrl/pseudo_lock.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/resctrl/pseudo_lock.c b/arch/x86/kernel/cpu/resctrl/pseudo_lock.c
index 2207916cae65..f0cc0a89333b 100644
--- a/arch/x86/kernel/cpu/resctrl/pseudo_lock.c
+++ b/arch/x86/kernel/cpu/resctrl/pseudo_lock.c
@@ -464,8 +464,8 @@ static int pseudo_lock_fn(void *_rdtgrp)
 	 * cache.
 	 */
 	__wrmsr(MSR_MISC_FEATURE_CONTROL, prefetch_disable_bits, 0x0);
-	closid_p = this_cpu_read(pqr_state.cur_closid);
-	rmid_p = this_cpu_read(pqr_state.cur_rmid);
+	closid_p = __this_cpu_read(pqr_state.cur_closid);
+	rmid_p = __this_cpu_read(pqr_state.cur_rmid);
 	mem_r = plr->kmem;
 	size = plr->size;
 	line_size = plr->line_size;
-- 
2.30.2


             reply	other threads:[~2021-07-23  2:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-23  2:33 Hui Su [this message]
2021-07-27 18:56 ` [PATCH] x86/intel_rdt: use __this_cpu_read in pseudo_lock_fn() Reinette Chatre
2021-07-30  8:22   ` 回复: " 苏辉(Robert Su)
2021-07-30 14:47     ` 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=20210723023342.3015-1-suhui@zeku.com \
    --to=suhui@zeku.com \
    --cc=bp@alien8.de \
    --cc=fenghua.yu@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=reinette.chatre@intel.com \
    --cc=tglx@linutronix.de \
    --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;
as well as URLs for NNTP newsgroup(s).