]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sif: eq: Implement threaded interrupt handler
authorFrancisco Triviño <francisco.trivino@oracle.com>
Tue, 13 Sep 2016 15:09:40 +0000 (17:09 +0200)
committerKnut Omang <knut.omang@oracle.com>
Mon, 3 Oct 2016 12:02:19 +0000 (14:02 +0200)
commitfbc3daa12a50ee78e8322a3cf552e4d9ab5f842b
treed9da533cf3370817f88c96d8b116b1e7c6dd71a5
parentc20ebffe5f8ec6d97b6e9eb2d2b7a3e16fb5e627
sif: eq: Implement threaded interrupt handler

The handler function (sif_intr) for a single interrupt is mostly
processing completions notification events (CNE) as long as there
are events in the queue. Sometimes the CNEs are received at a higher
rate than the handler is able to process them, then it keeps
infinitely processing events until the queue might be full, which
leads to a fatal error, or the watchdog triggers a kernel panic,
as shown in orabug 24657844.

This commit replaces request_irq by request_threaded_irq, which
allows the driver to specify a threaded handler (sif_intr_worker)
in addition. The original handler function (sif_intr) is called
in hard interrupt context and can return IRQ_HANDLED if the timeout
SIF_IRQ_HANDLER_TIMEOUT is not exceeded or IRQ_WAKE_THREAD otherwise.

The flag IRQF_ONESHOT is used to ensure that the interrupt is
disabled when IRQ_WAKE_THREAD is returned.

Orabug: 24657844

Signed-off-by: Francisco Triviño <francisco.trivino@oracle.com>
Reviewed-by: Knut Omang <knut.omang@oracle.com>
drivers/infiniband/hw/sif/sif_eq.c
drivers/infiniband/hw/sif/sif_eq.h