From: Jia-Ju Bai <baijiaju1990@gmail.com>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: ning.sun@intel.com, mingo@redhat.com, hpa@zytor.com,
x86@kernel.org, tboot-devel@lists.sourceforge.net,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kernel: x86: tboot: Replace mdelay with usleep_range in tboot_wait_for_aps
Date: Wed, 24 Jan 2018 21:37:46 +0800 [thread overview]
Message-ID: <fc5e01ed-e360-5d48-01ea-dbcafb6cf7f9@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1801241246350.1997@nanos>
On 2018/1/24 19:47, Thomas Gleixner wrote:
> On Wed, 24 Jan 2018, Jia-Ju Bai wrote:
>
>> 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?
>
> Thanks,
>
> tglx
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.
Thanks,
Jia-Ju Bai
next prev parent reply other threads:[~2018-01-24 13:38 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 [this message]
2018-01-24 17:20 ` Sun, Ning
2018-01-25 9:35 ` Thomas Gleixner
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=fc5e01ed-e360-5d48-01ea-dbcafb6cf7f9@gmail.com \
--to=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=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.