linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] irqchip/apple-aic: Correctly map the vgic maintenance interrupt
@ 2023-02-01 16:40 Marc Zyngier
  2023-02-02  1:01 ` Hector Martin
  2023-02-06 17:11 ` Oliver Upton
  0 siblings, 2 replies; 3+ messages in thread
From: Marc Zyngier @ 2023-02-01 16:40 UTC (permalink / raw)
  To: linux-arm-kernel, kvmarm, linux-kernel; +Cc: Hector Martin, Oliver Upton

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);
 	}
 
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] irqchip/apple-aic: Correctly map the vgic maintenance interrupt
  2023-02-01 16:40 [PATCH] irqchip/apple-aic: Correctly map the vgic maintenance interrupt Marc Zyngier
@ 2023-02-02  1:01 ` Hector Martin
  2023-02-06 17:11 ` Oliver Upton
  1 sibling, 0 replies; 3+ messages in thread
From: Hector Martin @ 2023-02-02  1:01 UTC (permalink / raw)
  To: Marc Zyngier, linux-arm-kernel, kvmarm, linux-kernel; +Cc: Oliver Upton

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

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] irqchip/apple-aic: Correctly map the vgic maintenance interrupt
  2023-02-01 16:40 [PATCH] irqchip/apple-aic: Correctly map the vgic maintenance interrupt Marc Zyngier
  2023-02-02  1:01 ` Hector Martin
@ 2023-02-06 17:11 ` Oliver Upton
  1 sibling, 0 replies; 3+ messages in thread
From: Oliver Upton @ 2023-02-06 17:11 UTC (permalink / raw)
  To: Marc Zyngier, linux-arm-kernel, linux-kernel, kvmarm
  Cc: Oliver Upton, Hector Martin

On Wed, 1 Feb 2023 16:40:56 +0000, 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".
> 
> [...]

Applied to kvmarm/next, thanks!

[1/1] irqchip/apple-aic: Correctly map the vgic maintenance interrupt
      https://git.kernel.org/kvmarm/kvmarm/c/ad818e6010ef

--
Best,
Oliver

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-06 17:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-01 16:40 [PATCH] irqchip/apple-aic: Correctly map the vgic maintenance interrupt Marc Zyngier
2023-02-02  1:01 ` Hector Martin
2023-02-06 17:11 ` Oliver Upton

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).