lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHp75VfC-1Lt2JZ-e_ReySNQTOwOfBi6JLOjEHUMNEyYk5JVyg@mail.gmail.com>
Date:   Sat, 25 Dec 2021 19:46:45 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Cc:     Sean Wang <sean.wang@...iatek.com>, Vinod Koul <vkoul@...nel.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        dmaengine <dmaengine@...r.kernel.org>,
        linux-arm Mailing List <linux-arm-kernel@...ts.infradead.org>,
        "moderated list:ARM/Mediatek SoC support" 
        <linux-mediatek@...ts.infradead.org>,
        Rob Herring <robh+dt@...nel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        Prabhakar <prabhakar.csengg@...il.com>
Subject: Re: [PATCH 1/3] dmaengine: nbpfaxi: Use platform_get_irq_optional()
 to get the interrupt

On Fri, Dec 24, 2021 at 3:14 PM Lad Prabhakar
<prabhakar.mahadev-lad.rj@...renesas.com> wrote:
>
> platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static
> allocation of IRQ resources in DT core code, this causes an issue
> when using hierarchical interrupt domains using "interrupts" property
> in the node as this bypasses the hierarchical setup and messes up the
> irq chaining.
>
> In preparation for removal of static setup of IRQ resource from DT core
> code use platform_get_irq_optional().
>
> There are no non-DT users for this driver so interrupt range
> (irq_res->start-irq_res->end) is no longer required and with DT we will
> be sure it will be a single IRQ resource for each index.

>         for (i = 0; irqs < ARRAY_SIZE(irqbuf); i++) {
> -               irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, i);
> -               if (!irq_res)
> +               irq = platform_get_irq_optional(pdev, i);
> +               if (irq == -ENXIO)
>                         break;
> -
> -               for (irq = irq_res->start; irq <= irq_res->end;
> -                    irq++, irqs++)
> -                       irqbuf[irqs] = irq;
> +               if (irq < 0)
> +                       return irq;
> +               irqbuf[irqs++] = irq;
>         }

Same comment as per other patch(es), i.e. consider 0 as no IRQ.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ