All of lore.kernel.org
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@arm.com>
To: Andrii Anisov <andrii.anisov@gmail.com>, xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Andrii Anisov <andrii_anisov@epam.com>
Subject: Re: [PATCH v2 2/2] arm/irq: skip action availability check for non-debug build
Date: Fri, 14 Dec 2018 15:23:12 +0000	[thread overview]
Message-ID: <fd9581d6-8386-2ad1-74fd-995999bed967@arm.com> (raw)
In-Reply-To: <1544638855-9432-3-git-send-email-andrii.anisov@gmail.com>

Hi Andrii,

On 12/12/18 6:20 PM, Andrii Anisov wrote:
> From: Andrii Anisov <andrii_anisov@epam.com>
> 
> Under desc->lock taken:
> An IRQ with _IRQ_GUEST flag set always has an action.
> An IRQ with _IRQ_DISABLED flag cleared always has an action.
> Those flags checks cover all accesses to desc->action in do_IRQ,
> so we can skip desc->action check in non-debug build.
> Keep in place for debug build to help diagnostics potential
> misconfiguration.
> 
> Signed-off-by: Andrii Anisov <andrii_anisov@epam.com>

Acked-by: Julien Grall <julien.grall@arm.com>

Cheers,

> ---
>   xen/arch/arm/irq.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c
> index d6a0273..4a02cc1 100644
> --- a/xen/arch/arm/irq.c
> +++ b/xen/arch/arm/irq.c
> @@ -209,12 +209,14 @@ void do_IRQ(struct cpu_user_regs *regs, unsigned int irq, int is_fiq)
>       spin_lock(&desc->lock);
>       desc->handler->ack(desc);
>   
> +#ifndef NDEBUG
>       if ( !desc->action )
>       {
>           printk("Unknown %s %#3.3x\n",
>                  is_fiq ? "FIQ" : "IRQ", irq);
>           goto out;
>       }
> +#endif
>   
>       if ( test_bit(_IRQ_GUEST, &desc->status) )
>       {
> 

-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-12-14 15:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-12 18:20 [PATCH 0/2] gic-vgic optimizations Andrii Anisov
2018-12-12 18:20 ` [PATCH v2 1/2] gic-vgic: Drop an excessive clear_lrs Andrii Anisov
2018-12-12 18:20 ` [PATCH v2 2/2] arm/irq: skip action availability check for non-debug build Andrii Anisov
2018-12-14 15:23   ` Julien Grall [this message]
2018-12-14 15:28 ` [PATCH 0/2] gic-vgic optimizations Julien Grall
2018-12-14 15:38   ` Andrii Anisov

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=fd9581d6-8386-2ad1-74fd-995999bed967@arm.com \
    --to=julien.grall@arm.com \
    --cc=andrii.anisov@gmail.com \
    --cc=andrii_anisov@epam.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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.