Project

General

Profile

Actions

Feature #3318

open

Support threaded irq handlers in envgen

Added by Vadim Mutilin almost 12 years ago. Updated almost 12 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
Environment Generation
Start date:
08/02/2012
Due date:
% Done:

0%

Estimated time:
Published in build:

Description

The function request_threaded_irq accepts two interrupt handlers
  1. @handler (second parameter) - Regular interrupt handler
  2. @thread_fn (third parameter) - Function called from the irq handler thread (has thread context, hence for example may use might_sleep functions)

From comments:
If you want to set up a threaded irq handler for your device
then you need to supply @handler and @thread_fn. @handler is
still called in hard interrupt context and has to check
whether the interrupt originates from the device. If yes it
needs to disable the interrupt on the device and return
IRQ_WAKE_THREAD which will wake up the handler thread and run
@thread_fn. This split handler design is necessary to support
shared interrupts.

extern int __must_check
request_threaded_irq(unsigned int irq, irq_handler_t handler,
                     irq_handler_t thread_fn,
                     unsigned long flags, const char *name, void *dev);
Driver environment generator should call
  • @handler with LDV_IN_INTERRUPT set (as usual)
  • @thread_fn without LDV_IN_INTERRUPT set

now it calls both with LDV_IN_INTERRUPT set

Actions #1

Updated by Vadim Mutilin almost 12 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF