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: <5241ecb9-4ab2-b01c-367c-38c554c056c4@lechnology.com>
Date:   Wed, 17 Jul 2019 12:21:42 -0500
From:   David Lechner <david@...hnology.com>
To:     Suman Anna <s-anna@...com>, Marc Zyngier <marc.zyngier@....com>,
        Rob Herring <robh+dt@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Jason Cooper <jason@...edaemon.net>
Cc:     Tony Lindgren <tony@...mide.com>, "Andrew F. Davis" <afd@...com>,
        Roger Quadros <rogerq@...com>,
        Lokesh Vutla <lokeshvutla@...com>,
        Grygorii Strashko <grygorii.strashko@...com>,
        Sekhar Nori <nsekhar@...com>,
        Murali Karicheri <m-karicheri2@...com>,
        devicetree@...r.kernel.org, linux-omap@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/6] irqchip/irq-pruss-intc: Add a PRUSS irqchip driver
 for PRUSS interrupts

On 7/16/19 12:21 PM, Suman Anna wrote:
>>> +static int pruss_intc_probe(struct platform_device *pdev)
>>> +{
>>> +    static const char * const irq_names[] = {
>>> +                "host0", "host1", "host2", "host3",
>>> +                "host4", "host5", "host6", "host7", };
>>> +    struct device *dev = &pdev->dev;
>>> +    struct pruss_intc *intc;
>>> +    struct resource *res;
>>> +    struct irq_chip *irqchip;
>>> +    int i, irq;
>>> +
>>> +    intc = devm_kzalloc(dev, sizeof(*intc), GFP_KERNEL);
>>> +    if (!intc)
>>> +        return -ENOMEM;
>>> +    platform_set_drvdata(pdev, intc);
>>> +
>>> +    res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>>> +    intc->base = devm_ioremap_resource(dev, res);
>>> +    if (IS_ERR(intc->base)) {
>>> +        dev_err(dev, "failed to parse and map intc memory resource\n");
>>> +        return PTR_ERR(intc->base);
>>> +    }
>>> +
>>> +    dev_dbg(dev, "intc memory: pa %pa size 0x%zx va %pK\n", &res->start,
>>> +        (size_t)resource_size(res), intc->base);
>>> +
>>> +    mutex_init(&intc->lock);
>>> +
>>> +    pruss_intc_init(intc);
>>> +
>>> +    irqchip = devm_kzalloc(dev, sizeof(*irqchip), GFP_KERNEL);
>>> +    if (!irqchip)
>>> +        return -ENOMEM;
>>> +
>>> +    irqchip->irq_ack = pruss_intc_irq_ack;
>>> +    irqchip->irq_mask = pruss_intc_irq_mask;
>>> +    irqchip->irq_unmask = pruss_intc_irq_unmask;
>>> +    irqchip->irq_retrigger = pruss_intc_irq_retrigger;
>>> +    irqchip->irq_request_resources = pruss_intc_irq_reqres;
>>> +    irqchip->irq_release_resources = pruss_intc_irq_relres;
>>> +    irqchip->name = dev_name(dev);
>>
>> Should we also set `irqchip->parent_device = dev;` here?
>>
>> I tried it and had to add pm runtime stuff as well, otherwise
>> requesting irqs would fail.
> 
> I haven't seen any during my local testing. What sort of failure are you
> seeing?
> 
> The clocking for the overall PRUSS module will be handled in either the
> ti-sysc driver for OMAP SoCs or in the pruss platform driver.
> 
I was getting -EACCESS bubbling up from rpm_resume() in drivers/base/
power/runtime.c. It was probably a mix of how I set up the device tree
and the dummy PRUSS bus driver I made.

I'm sure it will be fine with a proper PRUSS platform driver.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ