kvmarm.lists.cs.columbia.edu archive mirror
 help / color / mirror / Atom feed
From: Zenghui Yu <yuzenghui@huawei.com>
To: Andrew Jones <drjones@redhat.com>, <kvm@vger.kernel.org>,
	<kvmarm@lists.cs.columbia.edu>
Subject: Re: [PATCH kvm-unit-tests v2] arm64: timer: Speed up gic-timer-state check
Date: Tue, 11 Feb 2020 23:32:14 +0800	[thread overview]
Message-ID: <83803119-0ea8-078d-628b-537c3d9525b1@huawei.com> (raw)
In-Reply-To: <60c6c4c7-1d6b-5b64-adc1-8e96f45332c6@huawei.com>

On 2020/2/11 22:50, Zenghui Yu wrote:
> Hi Drew,
> 
> On 2020/2/11 21:37, Andrew Jones wrote:
>> Let's bail out of the wait loop if we see the expected state
>> to save over six seconds of run time. Make sure we wait a bit
>> before reading the registers and double check again after,
>> though, to somewhat mitigate the chance of seeing the expected
>> state by accident.
>>
>> We also take this opportunity to push more IRQ state code to
>> the library.
>>
>> Signed-off-by: Andrew Jones <drjones@redhat.com>
> 
> [...]
> 
>> +
>> +enum gic_irq_state gic_irq_state(int irq)
> 
> This is a *generic* name while this function only deals with PPI.
> Maybe we can use something like gic_ppi_state() instead?  Or you
> will have to take all interrupt types into account in a single
> function, which is not a easy job I think.

Just to follow up, gic_irq_get_irqchip_state()/gic_peek_irq() [*] is
the Linux implementation of this for PPIs and SPIs.

[*] linux/drivers/irqchip/irq-gic-v3.c


Thanks,
Zenghui

_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

  reply	other threads:[~2020-02-11 15:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11 13:37 [PATCH kvm-unit-tests v2] arm64: timer: Speed up gic-timer-state check Andrew Jones
2020-02-11 13:52 ` Alexandru Elisei
2020-02-11 14:05   ` Andrew Jones
2020-02-11 14:50 ` Zenghui Yu
2020-02-11 15:32   ` Zenghui Yu [this message]
2020-02-11 15:49     ` Andrew Jones
2020-02-11 15:41   ` Andrew Jones
2020-02-12  2:57     ` Zenghui Yu
2020-02-13  9:31       ` Andrew Jones

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=83803119-0ea8-078d-628b-537c3d9525b1@huawei.com \
    --to=yuzenghui@huawei.com \
    --cc=drjones@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    /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).