Visit Our UNIX and Linux User Community

Linux and UNIX Man Pages

Test Your Knowledge in Computers #460
Difficulty: Medium
The 64-bit timestamps used by NTP consist of a 32-bit part for seconds and a 32-bit part for fractional second.
True or False?
Linux & Unix Commands - Search Man Pages

request_threaded_irq(9) [centos man page]

REQUEST_THREADED_IRQ(9) 				     Public Functions Provided					   REQUEST_THREADED_IRQ(9)

request_threaded_irq - allocate an interrupt line SYNOPSIS
int request_threaded_irq(unsigned int irq, irq_handler_t handler, irq_handler_t thread_fn, unsigned long irqflags, const char * devname, void * dev_id); ARGUMENTS
irq Interrupt line to allocate handler Function to be called when the IRQ occurs. Primary handler for threaded interrupts If NULL and thread_fn != NULL the default primary handler is installed thread_fn Function called from the irq handler thread If NULL, no irq thread is created irqflags Interrupt type flags devname An ascii name for the claiming device dev_id A cookie passed back to the handler function DESCRIPTION
This call allocates interrupt resources and enables the interrupt line and IRQ handling. From the point this call is made your handler function may be invoked. Since your handler function must clear any interrupt the board raises, you must take care both to initialise your hardware and to set up the interrupt handler in the right order. 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. Dev_id must be globally unique. Normally the address of the device data structure is used as the cookie. Since the handler receives this value it makes sense to use it. If your interrupt is shared you must pass a non NULL dev_id as this is required when freeing the interrupt. FLAGS
IRQF_SHARED Interrupt is shared IRQF_TRIGGER_* Specify active edge(s) or level AUTHORS
Thomas Gleixner <> Author. Ingo Molnar <> Author. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 REQUEST_THREADED_IRQ(9)

Check Out this Related Man Page

struct_irq_data - per irq and irq chip data passed down to chip functions SYNOPSIS
struct irq_data { unsigned int irq; unsigned long hwirq; unsigned int node; unsigned int state_use_accessors; struct irq_chip * chip; struct irq_domain * domain; void * handler_data; void * chip_data; struct msi_desc * msi_desc; cpumask_var_t affinity; }; MEMBERS
irq interrupt number hwirq hardware interrupt number, local to the interrupt domain node node index useful for balancing state_use_accessors status information for irq chip functions. Use accessor functions to deal with it chip low level interrupt hardware access domain Interrupt translation domain; responsible for mapping between hwirq number and linux irq number. handler_data per-IRQ data for the irq_chip methods chip_data platform-specific per-chip private data for the chip methods, to allow shared chip implementations msi_desc MSI descriptor affinity IRQ affinity on SMP DESCRIPTION
The fields here need to overlay the ones in irq_desc until we cleaned up the direct references and switched everything over to irq_data. AUTHORS
Thomas Gleixner <> Author. Ingo Molnar <> Author. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 STRUCT IRQ_DATA(9)

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers


where can i find the i/o and irq's in mandrake 8 help lost :D (2 Replies)
Discussion started by: RYRY46D9
2 Replies

2. UNIX for Dummies Questions & Answers

Linux Device Driver: how can an ISR wake up a user-thread?

Hi all, Is it possible to do the following in Linux (kernel 2.6.x): - A user-space thread goes to "sleep". Using any call/mechanism - On a hardware generated interrupt, the Interrupt handler (ISR) "wakes" the sleeping user-thread. I have seen wait_event() and wake_up() but it appears... (1 Reply)
Discussion started by: agaurav
1 Replies

3. UNIX for Dummies Questions & Answers

Doubt with irq handler.......

Hello, I have develop a driver for my hardware and now, I need to handle a IRQ but I does not work. As I can understand, to handle a irq, it is necessary to make a request_irq(). If the return value is zero, ok, no problem to handle irq. Here is a easy example of my driver: #include... (8 Replies)
Discussion started by: webquinty
8 Replies

4. Programming

What is unbalanced IRQ?

------------------------ WARNING: at kernel/irq/manage.c:225 __enable_irq+0x3b/0x57() Unbalanced enable for IRQ 4 Modules linked in: svsknfdrvr Pid: 634, comm: ash Tainted: G W 2.6.28 #1 Call Trace: warn_slowpath+0x76/0x8d profile_tick+0x2d/0x57 irq_exit+0x32/0x34 ... (3 Replies)
Discussion started by: dragonpoint
3 Replies

5. UNIX for Advanced & Expert Users

Interrupt storm detected on "irq 20" throttling interrupt source

I receive the following warning messages on a very new machine which has FreeBSD 8.1 x64 installed on it: Interrupt storm detected on "irq 20" throttling interrupt source It is unclear what this means and what its origins are (motherboard? CPU? RAM?). I can start the desktop and the message is... (4 Replies)
Discussion started by: figaro
4 Replies

Featured Tech Videos