lkml.org 
[lkml]   [2021]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH] of: platform: Skip mapping of interrupts in of_device_alloc()
    On Thu, 09 Dec 2021 10:00:44 +0000,
    "Lad, Prabhakar" <prabhakar.csengg@gmail.com> wrote:
    >
    > > The root of the issue is that all the resource allocation is done
    > > upfront, way before we even have a driver that could potentially
    > > deal with this device. This is a potential waste of resource, and
    > > it triggers the issue you noticed.
    > >
    > > If you delay the resource allocation until there is an actual
    > > match with a driver, you could have a per-driver flag telling you
    > > whether the IRQ allocation should be performed before the probe()
    > > function is called.
    > >
    > As suggested by Rob, if we switch the drivers to use
    > platform_get_resource(pdev, IORESOURCE_IRQ, n) call with
    > platform_get_irq() this code should go away and with this switch the
    > resource allocation will happen demand. Is this approach OK?

    If you get rid of of_irq_to_resource_table() altogether, then yes,
    this has a fighting chance to work.

    M.


    --
    Without deviation from the norm, progress is not possible.

    \
     
     \ /
      Last update: 2021-12-09 11:33    [W:7.268 / U:0.092 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site