Function Report

Linux Kernel (v4.4)

Source File:kernel\irq\manage.c Create Date:2016-01-14 10:59:10
Last Modify:2016-01-11 07:01:32 Copyright©Brick
home page Tree
Annotate the kernelChinese

Function Name:request_percpu_irq

Function:int request_percpu_irq(unsigned int irq, irq_handler_t handler, const char *devname, void *dev_id)

Return Type:int

Parameter:

Type Parameter NameRemarks
unsigned int irq Interrupt line to allocate
irq_handler_t handler Function to be called when the IRQ occurs.
const char * devname An ascii name for the claiming device
void * dev_id A percpu cookie passed back to the handler function

Function description: allocate a percpu interrupt line

1887  If ! A percpu cookie passed back to the handler function then Returning -Invalid argument
1890  Interrupt descriptor = Interrupt to descriptor
1892  If !Interrupt descriptor || !irq_settings_can_request(Interrupt descriptor) || !irq_settings_is_per_cpu_devid(Interrupt descriptor) then Returning -Invalid argument
1895  action = allocate memory. The memory is set to zero.
1896  If !action then Returning -Out of memory
1899  interrupt handler function = Function to be called when the IRQ occurs.
1900  flags(see IRQF_* above) = Interrupt is per cpu | Do not disable this IRQ during suspend
1901  name of the device = An ascii name for the claiming device
1902  cookie to identify the device = A percpu cookie passed back to the handler function
1904  Inline functions for support of irq chips on slow busses
1905  register an interrupt
1906  chip_bus_sync_unlock(Interrupt descriptor)
1908  If result of register an interrupt then kfree(action)
1911  Returning result of register an interrupt