[lkml]   [2009]   [Oct]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectUsing set_irq_handler in set_irq_type callback?

    I'm seeing an imx31 (ARCH=arm) based system failing to boot .31.2-rt13.

    The reason is that the irq for the ethernet device is level triggered,
    but the handler for that interrupt is handle_edge_irq.
    As the handler is threaded with PREEMPT_RT=y, the irq is only acked but
    neither masked (as it is believed to be an edge irq) nor handled. This
    stucks the machine as the irq is still active.

    I think the fix for that is adding something like:

    if (type & IRQ_TYPE_EDGE_BOTH)
    set_irq_handler(irq, handle_edge_irq);
    set_irq_handler(irq, handle_level_irq);

    to the chip's .set_type callback. (Doing this directly fails, as
    .set_type holds desc->lock which set_irq_handler acquires, too. So
    maybe I need to code up a handler that checks how a given irq triggers
    and then calls handle_edge_irq or handle_level_irq.)

    The thing that let's me question that change is that I only found[1] a
    single .set_type callback that does something like that (i.e.

    Do I just miss something or are there more than one platforms that are
    in the need of handling this issue, too?

    Best regards

    [1] checking files found by

    git grep -c set_irq_handler | awk -F: '$2 >= 2'

    Pengutronix e.K. | Uwe Kleine-König |
    Industrial Linux Solutions | |
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2009-10-07 12:13    [W:0.066 / U:52.708 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site