KVM ARM Archive on lore.kernel.org
 help / color / Atom feed
From: Zenghui Yu <yuzenghui@huawei.com>
To: Andrew Jones <drjones@redhat.com>, <kvm@vger.kernel.org>,
Subject: Re: [PATCH kvm-unit-tests v2] arm64: timer: Speed up gic-timer-state check
Date: Tue, 11 Feb 2020 23:32:14 +0800
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


kvmarm mailing list

  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-11 13:37 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:

* 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 \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

KVM ARM Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/kvmarm/0 kvmarm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 kvmarm kvmarm/ https://lore.kernel.org/kvmarm \
	public-inbox-index kvmarm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git