mbox series

[v2,0/2] of: Fix interrupt-map for fw_devlink

Message ID 20240529-dt-interrupt-map-fix-v2-0-ef86dc5bcd2a@kernel.org (mailing list archive)
Headers show
Series of: Fix interrupt-map for fw_devlink | expand

Message

Rob Herring (Arm) May 29, 2024, 7:59 p.m. UTC
The duplicated parsing continued to bother me, so I've refactored things 
to avoid that for parsing the interrupt parent and args in the 
interrupt-map.

It passes testing with unittests on QEMU virt platform, but I don't 
think that catches the problematic cases. So please test.

v1: https://lore.kernel.org/all/20240528164132.2451685-1-maz@kernel.org/
 - Refactor existing interrupt-map parsing code and use it for 
   fw_devlink

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
---
Marc Zyngier (1):
      of: property: Fix fw_devlink handling of interrupt-map

Rob Herring (Arm) (1):
      of/irq: Factor out parsing of interrupt-map parent phandle+args from of_irq_parse_raw()

 drivers/of/irq.c        | 127 +++++++++++++++++++++++++++++-------------------
 drivers/of/of_private.h |   3 ++
 drivers/of/property.c   |  30 ++++--------
 3 files changed, 89 insertions(+), 71 deletions(-)
---
base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
change-id: 20240529-dt-interrupt-map-fix-a37b9aff5ca0

Best regards,

Comments

Marc Zyngier May 30, 2024, 1:54 p.m. UTC | #1
On Wed, 29 May 2024 20:59:19 +0100,
"Rob Herring (Arm)" <robh@kernel.org> wrote:
> 
> The duplicated parsing continued to bother me, so I've refactored things 
> to avoid that for parsing the interrupt parent and args in the 
> interrupt-map.
> 
> It passes testing with unittests on QEMU virt platform, but I don't 
> think that catches the problematic cases. So please test.
> 
> v1: https://lore.kernel.org/all/20240528164132.2451685-1-maz@kernel.org/
>  - Refactor existing interrupt-map parsing code and use it for 
>    fw_devlink
> 
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> Marc Zyngier (1):
>       of: property: Fix fw_devlink handling of interrupt-map
> 
> Rob Herring (Arm) (1):
>       of/irq: Factor out parsing of interrupt-map parent phandle+args from of_irq_parse_raw()
> 
>  drivers/of/irq.c        | 127 +++++++++++++++++++++++++++++-------------------
>  drivers/of/of_private.h |   3 ++
>  drivers/of/property.c   |  30 ++++--------
>  3 files changed, 89 insertions(+), 71 deletions(-)

I've just gave it a go on an M1 and as a kvmtool guest, and nothing
caught fire. Must be perfect.

Tested-by: Marc Zyngier <maz@kernel.org>

	M.
Anup Patel May 30, 2024, 2:52 p.m. UTC | #2
On Thu, May 30, 2024 at 1:29 AM Rob Herring (Arm) <robh@kernel.org> wrote:
>
> The duplicated parsing continued to bother me, so I've refactored things
> to avoid that for parsing the interrupt parent and args in the
> interrupt-map.
>
> It passes testing with unittests on QEMU virt platform, but I don't
> think that catches the problematic cases. So please test.
>
> v1: https://lore.kernel.org/all/20240528164132.2451685-1-maz@kernel.org/
>  - Refactor existing interrupt-map parsing code and use it for
>    fw_devlink
>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> ---
> Marc Zyngier (1):
>       of: property: Fix fw_devlink handling of interrupt-map
>
> Rob Herring (Arm) (1):
>       of/irq: Factor out parsing of interrupt-map parent phandle+args from of_irq_parse_raw()
>
>  drivers/of/irq.c        | 127 +++++++++++++++++++++++++++++-------------------
>  drivers/of/of_private.h |   3 ++
>  drivers/of/property.c   |  30 ++++--------
>  3 files changed, 89 insertions(+), 71 deletions(-)
> ---
> base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
> change-id: 20240529-dt-interrupt-map-fix-a37b9aff5ca0
>
> Best regards,
> --
> Rob Herring (Arm) <robh@kernel.org>
>

Works well for RISC-V, Thanks!

Tested-by: Anup Patel <apatel@ventanamicro.com>

Regards,
Anup