From: Peter Zijlstra <peterz@infradead.org>
To: Peter Shier <pshier@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Jacob Pan <jacob.jun.pan@linux.intel.com>,
Len Brown <lenb@kernel.org>, Michael Roth <michael.roth@amd.com>,
Alexei Starovoitov <ast@kernel.org>,
Josh Poimboeuf <jpoimboe@kernel.org>,
linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org
Subject: Re: [PATCH v2] intel_idle: avoid tracing MSR writes while idling
Date: Thu, 25 Aug 2022 10:41:01 +0200 [thread overview]
Message-ID: <Ywc1naLthsmxI0cF@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20220824234211.1625026-1-pshier@google.com>
On Wed, Aug 24, 2022 at 04:42:11PM -0700, Peter Shier wrote:
> With commit bf5835bcdb963 ("intel_idle: Disable IBRS during long idle"),
> enabling wrmsr trace with CONFIG_LOCKDEP causes "suspicious
> rcu_dereference_check() usage" warning because do_trace_write_msr does not
> use trace_write_msr_rcuidle.
>
> Change intel_idle_ibrs to use native_wrmsr to avoid tracing
>
> Signed-off-by: Peter Shier <pshier@google.com>
> ---
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> drivers/idle/intel_idle.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
> index 3e101719689a..df129c73786f 100644
> --- a/drivers/idle/intel_idle.c
> +++ b/drivers/idle/intel_idle.c
> @@ -187,12 +187,12 @@ static __cpuidle int intel_idle_ibrs(struct cpuidle_device *dev,
> int ret;
>
> if (smt_active)
> - wrmsrl(MSR_IA32_SPEC_CTRL, 0);
> + native_wrmsr(MSR_IA32_SPEC_CTRL, 0);
>
> ret = __intel_idle(dev, drv, index);
>
> if (smt_active)
> - wrmsrl(MSR_IA32_SPEC_CTRL, spec_ctrl);
> + native_wrmsr(MSR_IA32_SPEC_CTRL, spec_ctrl);
>
> return ret;
> }
> --
next prev parent reply other threads:[~2022-08-25 8:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-24 23:42 [PATCH v2] intel_idle: avoid tracing MSR writes while idling Peter Shier
2022-08-25 8:41 ` Peter Zijlstra [this message]
2022-08-25 11:43 ` Rafael J. Wysocki
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=Ywc1naLthsmxI0cF@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=ast@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jacob.jun.pan@linux.intel.com \
--cc=jpoimboe@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=michael.roth@amd.com \
--cc=mingo@redhat.com \
--cc=pshier@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.