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: <ef9f4279-1820-3e90-482e-c4e710859af6@gmail.com>
Date:   Wed, 20 Oct 2021 08:14:07 -0700
From:   Florian Fainelli <f.fainelli@...il.com>
To:     Marc Zyngier <maz@...nel.org>, Rob Herring <robh@...nel.org>
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Ray Jui <rjui@...adcom.com>,
        Scott Branden <sbranden@...adcom.com>,
        "maintainer:BROADCOM BCM281XX/BCM11XXX/BCM216XX ARM ARCHITE..." 
        <bcm-kernel-feedback-list@...adcom.com>,
        Russell King <linux@...linux.org.uk>,
        Catalin Marinas <catalin.marinas@....com>,
        Will Deacon <will@...nel.org>,
        Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
        Thomas Gleixner <tglx@...utronix.de>,
        Frank Rowand <frowand.list@...il.com>,
        "moderated list:ARM SUB-ARCHITECTURES" 
        <linux-arm-kernel@...ts.infradead.org>,
        "open list:MIPS" <linux-mips@...r.kernel.org>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE" 
        <devicetree@...r.kernel.org>
Subject: Re: [PATCH v4 09/14] irqchip: Provide platform_device to
 of_irq_init_cb_t



On 10/20/2021 1:24 AM, Marc Zyngier wrote:
> On Tue, 19 Oct 2021 23:23:52 +0100,
> Rob Herring <robh@...nel.org> wrote:
>>
>>   On Tue, Oct 19, 2021 at 4:43 PM Marc Zyngier <maz@...nel.org> wrote:
>>>
>>> diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h
>>> index ccf32758ea85..146a9d80a6a2 100644
>>> --- a/include/linux/irqchip.h
>>> +++ b/include/linux/irqchip.h
>>> @@ -33,7 +33,15 @@ extern int platform_irqchip_probe(struct platform_device *pdev);
>>>   #define IRQCHIP_PLATFORM_DRIVER_BEGIN(drv_name) \
>>>   static const struct of_device_id drv_name##_irqchip_match_table[] = {
>>>
>>> -#define IRQCHIP_MATCH(compat, fn) { .compatible = compat, .data = fn },
>>> +/* Undefined on purpose */
>>> +int typecheck_irq_init_cb(struct device_node *, struct device_node *,
>>> +                         struct platform_device *);
>>> +
>>> +#define typecheck_irq_init_cb(fn)                                      \
>>> +       __typecheck(typecheck_irq_init_cb, fn) ? fn : fn
>>
>> That's nice! Shouldn't it also be used for IRQCHIP_DECLARE?
> 
> Absolutely. And enabling this shows that changing of_irq_init_cb_t
> breaks *all users* of IRQCHIP_DECLARE(). Not an acceptable outcome
> when we're at -rc5. >
> Why can't the relevant drivers use of_find_device_by_node() instead?
> That would allow us to keep the status-quo on of_irq_init_cb_t.

Rob had suggested several solutions, including using 
of_find_device_by_node(), however updating of_irq_init_cb_t was 
indicated to be the better way. I had intentionally not updated 
IRQCHIP_DECLARE() because it would ignore the 3rd argument we passed to 
it (platform_device *) so I thought.

If I am spinning a v6 using of_find_device_by_node() would that be 
acceptable to you?
-- 
Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ