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: <CACRpkdZ=QKyKZHNL+hH+d8QVPKuXo+=8eQu-MOBV2wCzourwVQ@mail.gmail.com>
Date:   Wed, 17 Apr 2019 19:38:12 +0200
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Lina Iyer <ilina@...eaurora.org>
Cc:     Stephen Boyd <swboyd@...omium.org>,
        Evan Green <evgreen@...omium.org>,
        Marc Zyngier <marc.zyngier@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        rplsssn@...eaurora.org, linux-arm-msm@...r.kernel.org,
        "thierry.reding@...il.com" <thierry.reding@...il.com>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Doug Anderson <dianders@...omium.org>
Subject: Re: [PATCH v4 07/10] drivers: pinctrl: msm: setup GPIO irqchip hierarchy

On Wed, Apr 17, 2019 at 6:08 PM Lina Iyer <ilina@...eaurora.org> wrote:

> I am thinking of something like this. Would there be any issue in
> setting the type to IRQ_TYPE_SENSE_MASK instead of any one particular
> type?
>
> ---8<-----
> static int gpiochip_to_irq(struct gpio_chip *chip, unsigned offset)
> {
> #ifdef CONFIG_OF_GPIO
>         struct irq_fwspec fwspec;
>
>         if (chip->of_node) {
>                fwspec.fwnode = of_node_to_fwnode(chip->of_node);
>                fwspec.param[0] = offset;
>                fwspec.param[1] = IRQ_TYPE_SENSE_MASK;
>                fwspec.param_count = 2;
>                return irq_create_fwspec_mapping(&fwspec);
>         }
> #endif
>
>         if (!gpiochip_irqchip_irq_valid(chip, offset))
>                 return -ENXIO;
>
>         return irq_create_mapping(chip->irq.domain, offset);

Isn't the real problem that irq_create_mapping() isn't already doing this
for you?

chip->irq.domain is created with irq_domain_add_simple() and after
Thierrys patch with irq_domain_add_hierarchy(), so I think it is simply
that the hierarchical irqdomain helper code needs to go deeper here.

gpiolib needs struct irq_domain_ops for the hierarchical irqdomain
which implements generic versions of .translate(), .alloc() and .free().
I am working on this... albeit slowly :/

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ