mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hector Martin <marcan@marcan.st>
To: Marc Zyngier <maz@kernel.org>,
	linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev,
	linux-kernel@vger.kernel.org
Cc: Oliver Upton <oliver.upton@linux.dev>
Subject: Re: [PATCH] irqchip/apple-aic: Correctly map the vgic maintenance interrupt
Date: Thu, 2 Feb 2023 10:01:33 +0900	[thread overview]
Message-ID: <9d40dbc2-0950-9f35-0be6-a67cd68d7817@marcan.st> (raw)
In-Reply-To: <20230201164056.669509-1-maz@kernel.org>

On 02/02/2023 01.40, Marc Zyngier wrote:
> We currently allocate the vgic maintenance interrupt by calling into
> the low-level irqdomain code. Not only this is unnecessary, but this
> is also pretty wrong: we end-up skipping a bunch of irqdesc state
> setup
> 
> A simple "cat /proc/interrupt" shows how wrong we are, as the
> interrupt appears as "Edge" instead of "Level".
> 
> Instead, just call the standard irq_create_fwspec_mapping(), which
> is the right tool for the job. Duh.
> 
> Signed-off-by: Marc Zyngier <maz@kernel.org>
> ---
> 
> Notes:
>     This applies to Oliver's kvm-arm64/apple-vgic-mi branch.
> 
>  drivers/irqchip/irq-apple-aic.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/irqchip/irq-apple-aic.c b/drivers/irqchip/irq-apple-aic.c
> index 09fd52d91e45..76ee7c5e7b7e 100644
> --- a/drivers/irqchip/irq-apple-aic.c
> +++ b/drivers/irqchip/irq-apple-aic.c
> @@ -1201,9 +1201,7 @@ static int __init aic_of_ic_init(struct device_node *node, struct device_node *p
>  			},
>  		};
>  
> -		vgic_info.maint_irq = irq_domain_alloc_irqs(irqc->hw_domain,
> -							    1, NUMA_NO_NODE,
> -							    &mi);
> +		vgic_info.maint_irq = irq_create_fwspec_mapping(&mi);
>  		WARN_ON(!vgic_info.maint_irq);
>  	}
>  

Reviewed-by: Hector Martin <marcan@marcan.st>

- Hector

  reply	other threads:[~2023-02-02  1:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01 16:40 Marc Zyngier
2023-02-02  1:01 ` Hector Martin [this message]
2023-02-06 17:11 ` Oliver Upton

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=9d40dbc2-0950-9f35-0be6-a67cd68d7817@marcan.st \
    --to=marcan@marcan.st \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    /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

all inboxes | Powered by JetHome®