linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: "Sun, Ning" <ning.sun@intel.com>
Cc: Jia-Ju Bai <baijiaju1990@gmail.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"tboot-devel@lists.sourceforge.net"
	<tboot-devel@lists.sourceforge.net>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] kernel: x86: tboot: Replace mdelay with usleep_range in tboot_wait_for_aps
Date: Thu, 25 Jan 2018 10:35:17 +0100 (CET)	[thread overview]
Message-ID: <alpine.DEB.2.20.1801251033150.2020@nanos> (raw)
In-Reply-To: <83BE7A8C0111FD48951B68B36BEFDFD40D135D39@ORSMSX107.amr.corp.intel.com>

On Wed, 24 Jan 2018, Sun, Ning wrote:

Please do NOT top post and do NOT include the whole mail header in your
reply.

> >> The function tboot_wait_for_aps is not called in atomic context.
> >> Thus mdelay can be replaced with usleep_range, to reduce busy wait.
> > And how did you establish that it's not called in atomic context?
> >
> It is reported by a static analysis tool written by myself.  This tool
> finds that mdelay in tboot_wait_for_aps is not called by holding a
> spinlock or in an interrupt handler, thus mdelay can be replaced.

> It looks like tboot_wait_for_aps(...) is not called in atomic context .

You are both failing to look at the calling context of this. Care to follow
the invocation chain and look at the context?

Thanks,

	tglx

      reply	other threads:[~2018-01-25  9:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-24  1:58 [PATCH] kernel: x86: tboot: Replace mdelay with usleep_range in tboot_wait_for_aps Jia-Ju Bai
2018-01-24 11:47 ` Thomas Gleixner
2018-01-24 13:37   ` Jia-Ju Bai
2018-01-24 17:20     ` Sun, Ning
2018-01-25  9:35       ` Thomas Gleixner [this message]

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=alpine.DEB.2.20.1801251033150.2020@nanos \
    --to=tglx@linutronix.de \
    --cc=baijiaju1990@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=ning.sun@intel.com \
    --cc=tboot-devel@lists.sourceforge.net \
    --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).