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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMSo37US03pKhPR=a1sJnWMF6L+WDvhWz469G=+0XY2WX-p=bg@mail.gmail.com>
Date:   Sat, 11 Jun 2022 13:27:48 +0800
From:   Yongqin Liu <yongqin.liu@...aro.org>
To:     Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Cc:     Rob Herring <robh+dt@...nel.org>, Marc Zyngier <maz@...nel.org>,
        Frank Rowand <frowand.list@...il.com>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        Prabhakar <prabhakar.csengg@...il.com>,
        linux-renesas-soc@...r.kernel.org,
        Biju Das <biju.das.jz@...renesas.com>
Subject: Re: [RFC PATCH] of/platform: Drop static setup of IRQ resource from
 DT core

Hi, Lad

# sorry for the confusion if you have received it before with the
non-plain-text mode

In this change you said "all the DT drivers have switched to
platform_get_irq()",
could you please help share with me one example about the above change
as reference?
We have one hikey960 android build with some out of tree changes,
which could not boot
successfully with some errors on surfaceflinger(I am not sure it's a
problem with the gpu or display),
but could boot if I have this change reverted.

I guess it needs some changes on the gpu/display dts or driver side to
have it work
with this change, not sure if you could give some suggestions on the fix.

And here are two out of tree changes might be related listed here just
for reference in case:
https://android-review.linaro.org/c/kernel/common/+/21680
https://android-review.linaro.org/c/kernel/common/+/21682

Thanks in advance!

On Thu, 17 Mar 2022 at 04:07, Lad Prabhakar
<prabhakar.mahadev-lad.rj@...renesas.com> wrote:
>
> Now that all the DT drivers have switched to platform_get_irq() we can now
> safely drop the static setup of IRQ resource from DT core code.
>
> With the above change hierarchical setup of irq domains is no longer
> bypassed and thus allowing hierarchical interrupt domains to describe
> interrupts using "interrupts" DT property.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
> ---
> Hi All,
>
> Sending this as RFC as couple of more drivers need to hit -rc yet with
> the platform_get_irq() change while that is in progress I wanted to get
> some feedback on this patch.
>
> Cheers,
> Prabhakar
> ---
>  drivers/of/platform.c | 14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index 793350028906..6890f7fe556f 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -114,35 +114,31 @@ struct platform_device *of_device_alloc(struct device_node *np,
>                                   struct device *parent)
>  {
>         struct platform_device *dev;
> -       int rc, i, num_reg = 0, num_irq;
> +       int rc, i, num_reg = 0;
>         struct resource *res, temp_res;
>
>         dev = platform_device_alloc("", PLATFORM_DEVID_NONE);
>         if (!dev)
>                 return NULL;
>
> -       /* count the io and irq resources */
> +       /* count the io resources */
>         while (of_address_to_resource(np, num_reg, &temp_res) == 0)
>                 num_reg++;
> -       num_irq = of_irq_count(np);
>
>         /* Populate the resource table */
> -       if (num_irq || num_reg) {
> -               res = kcalloc(num_irq + num_reg, sizeof(*res), GFP_KERNEL);
> +       if (num_reg) {
> +               res = kcalloc(num_reg, sizeof(*res), GFP_KERNEL);
>                 if (!res) {
>                         platform_device_put(dev);
>                         return NULL;
>                 }
>
> -               dev->num_resources = num_reg + num_irq;
> +               dev->num_resources = num_reg;
>                 dev->resource = res;
>                 for (i = 0; i < num_reg; i++, res++) {
>                         rc = of_address_to_resource(np, i, res);
>                         WARN_ON(rc);
>                 }
> -               if (of_irq_to_resource_table(np, res, num_irq) != num_irq)
> -                       pr_debug("not all legacy IRQ resources mapped for %pOFn\n",
> -                                np);
>         }
>
>         dev->dev.of_node = of_node_get(np);
> --
> 2.17.1
>


-- 
Best Regards,
Yongqin Liu
---------------------------------------------------------------
#mailing list
linaro-android@...ts.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-android

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ