Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\irq\manage.c Create Date:2022-07-28 10:10:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:quest_nmi - allocate an interrupt line for NMI delivery*@irq: Interrupt line to allocate*@handler: Function to be called when the IRQ occurs

Proto:int request_nmi(unsigned int irq, irq_handler_t handler, unsigned long irqflags, const char *name, void *dev_id)

Type:int

Parameter:

TypeParameterName
unsigned intirq
irq_handler_thandler
unsigned longirqflags
const char *name
void *dev_id
2121  If irq == If a (PCI) device interrupt is not connected we set dev->irq to* IRQ_NOTCONNECTED Then Return -ENOTCONN
2125  If irqflags & ( allow sharing the irq among several devices | If the IRQ is shared with a NO_SUSPEND user | Interrupt is used for polling) Then Return -EINVAL
2128  If Not (irqflags & Interrupt is per cpu) Then Return -EINVAL
2131  If Not handler Then Return -EINVAL
2134  desc = Interrupt to descriptor
2136  If Not desc || irq_settings_can_autoenable(desc) || Not irq_settings_can_request(desc) || WARN_ON(irq_settings_is_per_cpu_devid(desc)) || Not irq_supports_nmi(desc) Then Return -EINVAL
2142  action = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc).
2143  If Not action Then Return -ENOMEM
2146  handler = handler
2147  flags = irqflags | Interrupt cannot be threaded | Flag to exclude this interrupt from irq balancing
2148  name = name
2149  dev_id = dev_id
2151  retval = q_chip_pm_get - Enable power for an IRQ chip*@data: Pointer to interrupt specific data* Enable the power to the IRQ chip referenced by the interrupt data* structure.
2152  If retval < 0 Then Go to err_out
2155  retval = register an interrupt
2156  If retval Then Go to err_irq_setup
2159  raw_spin_lock_irqsave( & lock, flags)
2162  istate |= IRQS_NMI
2163  retval = irq_nmi_setup(desc)
2164  If retval Then
2165  This function must be called with desc->lock held
2166  raw_spin_unlock_irqrestore( & lock, flags)
2167  Return -EINVAL
2170  raw_spin_unlock_irqrestore( & lock, flags)
2172  Return 0
2174  err_irq_setup :
2175  q_chip_pm_put - Disable power for an IRQ chip*@data: Pointer to interrupt specific data* Disable the power to the IRQ chip referenced by the interrupt data* structure, belongs. Note that power will only be disabled, once this
2176  err_out :
2177  kfree - free previously allocated memory*@objp: pointer returned by kmalloc.* If @objp is NULL, no operation is performed.* Don't free memory not originally allocated by kmalloc()* or you will run into trouble.
2179  Return retval