lkml.org 
[lkml]   [2008]   [Aug]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] genirq: irq_chip->startup() usage in setup_irq and set_irq_chained handler
    From
    Date
    > The second change is a significant semantic change. I wouldn't be
    > surprised if I have cases that rely (or work around) the lack of
    > startup() in set_irq_chained_handler(). I'll have to dbl check things
    > next week.

    Let me briefly explain my situation. I have a main interrupt controller
    which provides startup() and unmask/mask() functions. The first one is
    rather expensive (as the controller itself is... hmmm...
    complicated ;-), the second - very cheap. And that is how I understand
    the different "levels" of interrupt access - startup() should be called
    once, somewhere during request_irq(), (un)masking may be used
    frequently.

    And one of the interrupt is generated by hardware PIO controller. The
    idea was obvious - register a chained handler, which decodes the PIO
    controller state and generates a interrupt, which number may be obtained
    by gpio_to_irq(). Sounds simple, doesn't it? :-)

    And in that moment the problem raised its ugly head - the interrupt
    controller's startup() was never called for the PIO interrupt (as there
    was no request_irq()), so the hardware wasn't configured properly and...
    well... bad things were happening ;-)

    So unless I totally misunderstood the meaning of irq_chip callbacks, I
    believe the startup() should be called in set_irq_chained_handler().

    Regards

    Paweł



    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2008-08-26 12:51    [W:0.024 / U:65.032 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site